-
Notifications
You must be signed in to change notification settings - Fork 0
Ship metal_stack_release_vector module.
#40
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
f8fbedb
Ship metal-stack-release-vector module.
Gerrit91 6edfa50
Add TODOs.
Gerrit91 982dde7
Add to README.
Gerrit91 ea0effb
Allow setting registry password and recurse into subvectors.
Gerrit91 716fa45
Allow to switch off recurse.
Gerrit91 7b72177
Add TODO.
Gerrit91 aaa2907
Add bcrypt.
Gerrit91 baf368f
More complete module.
Gerrit91 af65cf9
More complete module.
Gerrit91 53277ca
More improvements.
Gerrit91 3f093cb
Move to collection.
Gerrit91 360a22e
Install from ansible-common.
Gerrit91 d524b48
Remove cat.
Gerrit91 668b51c
Merge branch 'master' into metal-stack-release-vector
Gerrit91 32f6357
Install cosign.
Gerrit91 d5ec792
Test in CI.
Gerrit91 3cb3712
No tty in CI.
Gerrit91 5082b19
Next attempt.
Gerrit91 0f54aa7
Just copy to bin.
Gerrit91 9cee7e4
Extend README.
Gerrit91 706ee0c
Merge branch 'master' into metal-stack-release-vector
Gerrit91 8ead19a
Merge remote-tracking branch 'origin/master' into metal-stack-release…
Gerrit91 ace073f
Merge branch 'master' into metal-stack-release-vector
Gerrit91 337c1c3
Sign deployment image.
Gerrit91 be345e7
Rename.
Gerrit91 bcee8a3
Pin.
Gerrit91 fa792ac
Better test.
Gerrit91 84cedfa
Pin.
Gerrit91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ARG TAG=metal-deployment-base | ||
| FROM ${TAG} | ||
| COPY test . |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| TAG := $(or $(TAG),metal-deployment-base) | ||
|
|
||
| ifeq ($(CI),true) | ||
| DOCKER_RUN_ARG= | ||
| else | ||
| DOCKER_RUN_ARG=t | ||
| endif | ||
|
|
||
| .PHONY: build | ||
| build: | ||
| docker build -t $(TAG) . | ||
|
|
||
| .PHONY: test | ||
| test: | ||
| docker build -t $(TAG)-test -f Dockerfile.test --build-arg=TAG=$(TAG) . | ||
| docker run --rm -i$(DOCKER_RUN_ARG) $(TAG)-test bash -c \ | ||
| 'ansible -m metalstack.base.metal_stack_release_vector localhost && find ~/.ansible/roles -maxdepth 1 -type d -ls' | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,30 @@ | ||
| # metal-stack deployment | ||
|
|
||
| This repository builds the deployment base image that can be used for deploying metal-stack with Ansible. | ||
|
|
||
| ## Using metal-stack Ansible Roles | ||
|
|
||
| In case your deployment depends on Ansible roles that are referenced in a metal-stack release vector (e.g. [releases](https://github.com/metal-stack/releases)), these role dependencies can be dynamically installed through the release vector OCI artifacts by running the following command before playbook execution: | ||
|
|
||
| ```bash | ||
| # requires the metal_stack_release_vectors variable to be defined in your ansible variables | ||
| $ ansible localhost -m metalstack.base.metal_stack_release_vector | ||
| - Installing ansible-common (v0.6.13) to /root/.ansible/roles/ansible-common | ||
| - Installing metal-ansible-modules (v0.2.10) to /root/.ansible/roles/metal-ansible-modules | ||
| - Installing metal-roles (v0.15.17) to /root/.ansible/roles/metal-roles | ||
| ``` | ||
|
|
||
| Alternatively, you can also create a small playbook and execute this instead: | ||
|
|
||
| ```yaml | ||
| --- | ||
| # requires the metal_stack_release_vectors variable to be defined in your ansible variables | ||
| - name: Resolve metal-stack release vector | ||
| gather_facts: no | ||
| hosts: localhost | ||
| connection: local | ||
| tasks: | ||
| - metalstack.base.metal_stack_release_vector: | ||
| ``` | ||
|
|
||
| After that, just as if `ansible-galaxy` was used, the roles referenced in the release vector are installed in `~/.ansible/roles`. |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| metal_stack_release_vectors: | ||
| - url: oci://ghcr.io/metal-stack/releases:develop | ||
| variable_mapping_path: metal_stack_release.mapping | ||
| include_role_defaults: metal-roles/common/roles/defaults | ||
| oci_cosign_verify_key: | | ||
| -----BEGIN PUBLIC KEY----- | ||
| MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdeAXd2namgVNDT0APmogKGwaV+Q4 | ||
| rfe4uVgmsyBbb6TrhX5Py6x1PsonDahTvdVpbSGC7QGEjxIHdi8HnJ4Okg== | ||
| -----END PUBLIC KEY----- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.