Skip to content

Commit

Permalink
Removing CLI
Browse files Browse the repository at this point in the history
Only run groot as a server
  • Loading branch information
fao89 committed Apr 3, 2022
1 parent cb44cc5 commit 31e153b
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 274 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features

- name: Test
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -73,11 +74,12 @@ jobs:
- community.postgresql
EOF
- name: Run
uses: actions-rs/cargo@v1
with:
command: run
args: -- sync --requirement requirements.yml

run: |
./target/release/groot &
sleep 2
curl -X POST -F '[email protected]' http://127.0.0.1:3030/sync/
sleep 5
ansible-galaxy collection install -vvv community.postgresql -c -s http://127.0.0.1:3030/
macos:
runs-on: macos-latest
strategy:
Expand All @@ -98,6 +100,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features

- name: Test
uses: actions-rs/cargo@v1
Expand Down
156 changes: 16 additions & 140 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "groot"
version = "0.3.0"
version = "0.4.0"
description = "The coolest guardian of the galaxy!"
repository = "https://github.com/fao89/groot"
authors = ["Fabricio Aguiar <[email protected]>"]
Expand All @@ -17,7 +17,6 @@ serde_json = "1.0"
tokio = { version = "1.11", features = ["rt-multi-thread", "fs"] }
anyhow ="1.0"
url = "2.2"
structopt = "0.3"
futures = "0.3"
yaml-rust = "0.4"
pretty_env_logger = "0.4"
Expand All @@ -26,7 +25,7 @@ actix-files = "0.6"
actix-multipart = "0.4"
serde = { version = "1.0", features = ["derive"] }
dotenv = "0.15"
config = "0.12"
config = "0.13"
semver = "1.0"
diesel = { version = "1.4", features = ["postgres", "r2d2", "serde_json"] }
diesel_migrations = "1.4"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN apt-get -y update && \
apt -y install ca-certificates libssl-dev libpq-dev

COPY --from=build /target/release/groot /usr/local/bin
CMD ["/usr/local/bin/groot", "--serve"]
CMD ["/usr/local/bin/groot"]
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,26 @@ Please have a `.env` file with the following variables:

## Downloading
```console
$ curl -L https://github.com/fao89/groot/releases/download/0.3.0/groot-linux-amd64 -o groot
$ curl -L https://github.com/fao89/groot/releases/download/0.4.0/groot-linux-amd64 -o groot
$ chmod +x groot
```
## Sync roles or collections

Mirror:
- Client-side:
```console
$ ./groot sync --content <roles | collections>
```

- Server-side:
```console
$ curl -X POST http://127.0.0.1:3030/sync/<roles | collections>
```

From requirements.yml
- Client-side:
```console
$ ./groot sync --requirement requirements.yml
```

- Server-side:
```console
$ curl -X POST -F '[email protected]' http://127.0.0.1:3030/sync/
```

## Serving content
```console
$ curl -L https://github.com/fao89/groot/releases/download/0.3.0/groot-linux-amd64 -o groot
$ curl -L https://github.com/fao89/groot/releases/download/0.4.0/groot-linux-amd64 -o groot
$ chmod +x groot
$ ./groot --serve
$ ./groot
```
Install role/collection from groot:
```console
Expand Down
Loading

0 comments on commit 31e153b

Please sign in to comment.