Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Subtask] Compile distribution the Graviton #150

Closed
Tracked by #76
xunliu opened this issue Jul 31, 2023 · 0 comments
Closed
Tracked by #76

[Subtask] Compile distribution the Graviton #150

xunliu opened this issue Jul 31, 2023 · 0 comments
Assignees

Comments

@xunliu
Copy link
Collaborator

xunliu commented Jul 31, 2023

Describe the subtask

Distribution of the Graviton project.

Support the ./gradle compileDistribution command.

Directory struct

graviton
├── ...
└── distribution/package
    ├── bin/
    ├── catalogs/catalog-hive
    ├── conf/
    ├── lib/
    ├── graviton-${version}-bin.tar
    └── graviton-${version}-bin.tar.sha256
  • This command depends ./gradle build

Parent Issue

#76

@xunliu xunliu changed the title [FEATURE] Gravtion server packaging [Subtask] Package the Graviton Jul 31, 2023
@jerryshao jerryshao added this to the Graviton v0.2.0 milestone Aug 1, 2023
@xunliu xunliu self-assigned this Aug 7, 2023
@xunliu xunliu changed the title [Subtask] Package the Graviton [Subtask] Compile distribution the Graviton Aug 10, 2023
jerryshao pushed a commit that referenced this issue Aug 11, 2023
### What changes were proposed in this pull request?

Through `graviton.sh` script launching GravtionServer.

#### Command
```
./bin/graviton.sh [--config <conf-dir>] {start|stop|restart|status}
```

#### Directory struct
```
├── bin
│   ├── command.sh
│   └── graviton.sh
├── conf
│   ├── graviton.conf.template
│   ├── graviton-env.sh.template
│   └── log4j.properties.template
└── distribution/package
    ├── bin/
    ├── catalogs/catalog-hive
    ├── conf/
    ├── lib/
    ├── graviton-${version}-bin.tar
    └── graviton-${version}-bin.tar.sha256
```

#### Scripts context
+ bin/command.sh: Command functions
+ bin/graviton.sh: Launching scripts
+ conf/graviton.conf.template: All configuration templates for Gravtion
+ conf/gravtion-env.sh.template: Environment variables, etc., JAVA_HOME,
GRAVITON_HOME etc.,
+ conf/log4j.properties.template: log4j configuration for Gravtion
Server.

#### Assemble Distribution
1. `./gradlew clean build`
2. `./gradlew compileDistribution`

+ Copy `${project_root_dir}/bin/` directory to
`${project_root_dir}/distribution/package/bin/`.
+ Copy `${project_root_dir}/conf/` directory to
`${project_root_dir}/distribution/package/conf/` and remove `.template`
file name suffix.
+ Copy `${project_root_dir}/${sub_module}/lib` to
`${project_root_dir}/distribution/package/lib/`
+ Copy `${project_root_dir}/catalog-hive}/lib` to
`${project_root_dir}/distribution/package/catalogs/catalog-hive/lib`

3. `./gradlew assembleDistribution` 

+ Compress `${project_root_dir}/distribution/package` generate
`graviton-${version}-bin.tar` and `graviton-${version}-bin.tar.sha256`

4. `./distribution/package/bin/graviton.sh start|stop|status`

### Why are the changes needed?

Through script launching `Graviton Server`.

Fix: #178 

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

Test on PullRequst submission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants