I hereby claim:
- I am gitrgoliveira on github.
- I am rgoliveira (https://keybase.io/rgoliveira) on keybase.
- I have a public key whose fingerprint is 75B4 B53C E466 6DB5 E58F 2A5C 9C34 E8B1 3A2A BCAE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #! /bin/bash | |
| # https://192.168.99.102:8443/console | |
| MINISHIFT="true" | |
| OPENSHIFT=192.168.99.103:8443 | |
| OPENSHIFT_ADDR=https://$OPENSHIFT | |
| PROJECT=vault-test | |
| export VAULT_ADDR='http://127.0.0.1:8200' |
| #! /bin/bash | |
| # | |
| # based on https://medium.com/google-cloud/vault-auth-and-secrets-on-gcp-51bd7bbaceb | |
| # | |
| ################################################################ | |
| # setup GCP | |
| ################################################################ | |
| PROJECT_ID=`gcloud config get-value core/project` |
| #! /bin/bash | |
| # downloading MongoDB | |
| mkdir -p mongodb | |
| mkdir -p mongodb_data | |
| curl -o mongodb/mongodb.tgz https://downloads.mongodb.com/osx/mongodb-macos-x86_64-enterprise-4.2.2.tgz | |
| tar -zxvf mongodb/mongodb.tgz --strip-components=1 -C mongodb | |
| # assuming Vault Enterprise is already installed | |
| # setting it up |
| #! /bin/bash | |
| # | |
| # `az login` must be run first | |
| # | |
| BOUNDARY_ADDR=https://boundary.ric-lnd.ric.aws.hashidemos.io:9200 | |
| if [ -f "boundary_auth_created.json" ]; then | |
| echo "removing previous OIDC" | |
| boundary auth-methods delete -id $(jq -r .item.id boundary_auth_created.json) |
| export VAULT_ADDR="https://xxxx:8200" | |
| export VAULT_NAMESPACE="admin" | |
| export VAULT_TOKEN=xxx | |
| tee vault-action.hcl <<EOF | |
| path "kv/data/ci" { | |
| capabilities = ["read"] | |
| } |
| name: ImageBuilder | |
| # Run this workflow every time a new commit pushed to your repository | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Import Secrets | |
| uses: hashicorp/[email protected] |
| vault auth enable jwt | |
| vault write auth/jwt/config \ | |
| oidc_discovery_url="https://token.actions.githubusercontent.com" \ | |
| bound_issuer="https://token.actions.githubusercontent.com" \ | |
| default_role="demo" | |
| # "user_claim": "workflow" defines the entity alias. | |
| vault write auth/jwt/role/demo -<<EOF | |
| { |
| nomad agent -dev -bind 0.0.0.0 -acl-enabled >nomad-server.log & | |
| sleep 5 | |
| nomad acl bootstrap -json > bootstrap.json | |
| export NOMAD_TOKEN=$(jq -r .SecretID bootstrap.json) | |
| # creating a namespace and quota | |
| nomad namespace apply -description "QA instances of webservers" web-qa | |
| nomad quota init | |
| nomad quota apply spec.hcl |