-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from machacekondra/remove_collector
Remove collector container and merge it with planner
- Loading branch information
Showing
11 changed files
with
123 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,29 @@ To run the collector localy here are the steps. | |
## Prepare | ||
Prepare the dependencies. | ||
|
||
### Configuration | ||
Create the planner-agent configuration file: | ||
|
||
``` | ||
$ mkdir /tmp/config | ||
$ mkdir /tmp/data | ||
$ cat <<EOF > ~/.planner-agent/config.yaml | ||
config-dir: /tmp/config | ||
data-dir: /tmp/data | ||
log-level: debug | ||
source-id: 9195e61d-e56d-407d-8b29-ff2fb7986928 | ||
update-interval: 5s | ||
planner-service: | ||
service: | ||
server: http://127.0.0.1:7443 | ||
EOF | ||
``` | ||
|
||
### Credentials | ||
Create VMware credentials file. | ||
|
||
``` | ||
cat <<EOF > /tmp/creds.json | ||
cat <<EOF > /tmp/data/creds.json | ||
{ | ||
"username": "[email protected]", | ||
"password": "userpassword", | ||
|
@@ -28,7 +46,7 @@ podman run -p 8181:8181 -d --name opa --entrypoint '/usr/bin/opa' quay.io/kubev2 | |
Build & run the collector code specifying credentials file as first argument and as second path to invetory file, where data should be written. | ||
|
||
``` | ||
go run cmd/collector/main.go /tmp/creds.json /tmp/inventory.json | ||
go run cmd/planner-agent/main.go -config -config ~/.planner-agent/config.yaml | ||
``` | ||
|
||
Explore `/tmp/inventory.json` | ||
Explore `/tmp/data/inventory.json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.