Skip to content

shreddedbacon/credhub-webui-boshrelease

Repository files navigation

CredHub WebUI BOSH Release

A bosh release to deploy a credhub web user interface

Usage

git clone https://github.com/shreddedbacon/credhub-webui-boshrelease.git credhub-webui && cd $_

UAA Client

You will need to apply ops similar to this to your UAA to allow CredHub WebUI to use OAuth

# add a credhub user to bosh deployed uaa
- type: replace
  path: /instance_groups/name=bosh/jobs/name=uaa/properties/uaa/scim/users/-
  value:
    name: credhub
    groups: [credhub.write, credhub.read]
    password: credhub

# add a credhub webui client and button to uaa portal
- type: replace
  path: /instance_groups/name=bosh/jobs/name=uaa/properties/uaa/clients/credhub_webui?
  value:
    override: true
    authorized-grant-types: authorization_code,refresh_token
    scope: credhub.read,credhub.write
    authorities: ""
    access-token-validity: 300
    refresh-token-validity: 1800
    secret: "credhubsecret"
    autoapprove: true
    override: true
    redirect-uri: https://localhost:8443/login/callback #should match the url that will run your credhub-webui
    show-on-homepage: true
    app-launch-url: https://localhost:8443 #should match the url that will run your credhub-webui
    app-icon: "iVBORw0KGgoAAAANSUhEUgAAAG4AAABuCAYAAADGWyb7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH4gwOCQgJDKODOAAAFgNJREFUeNrtnXl0nNV5xn/3W2bVbkle5F2SF8lC3ohZbBZjG5KSQAnQppTQhpQmTZt0IaG0aXJySlpyspWSQICQQjgYAmFpATveN+x6ky3JkmzLWixbsiRrX0azft/bP2Yk2SAb5xSskTXPOT5HPiNp7nefebfnvvcVJJBAAgkkMN7QffaUbH/lB/L8171yYP2vxNfT/viV+JzqSnmQgd6Oh05W7numdMMTdDXtwXTNJuwvI2v23RSv+Qpzl65SCeLiDPUVe6Ri21rq9/0Mw5uDbqYCNqARCbZhh9rIX/5PFK74Q6bNu1oliBtlnD11TI7seIOa//1ngj5wpS0FO4hIZOjxlGYAJv6uErwZ05m74mEKl3+WjEmzVIK4y4z+7rbXju9bf8+RLU/R27IXR1IBuunCtgYu+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cIxAP6TPuJZJM/ISMW40EP3zl4Mkah9wm8NZpdjRU/LmunI5e+JtNA2ycm8lJ3+xShA3CjAMByLRpVuhM+c3Dg1mlTLcqtfZ2kJHXRmedC9T8wsT5cBoIWfO1Spz5jUgDQz09NNQtXeYN9uO8maD7vBGLa56DyKQlL2a6QXXJIgbTSy57UEcrglozlwOv/MATSdKz8vvxQbT6aaj+aScLn8JRxJMylsU++tVCeJGz+ryF6uiNd8n4q8lHHJzcP1zBH2dqzTDgW1Fp8NGAt20N52gt7UWw5lK/tLbEspJPKDg2tuZmH8HIgZNR35O1Z53NkWn5IHhmoevs46Gsg0oAzJn3sL0+ctUgrg4QErmFLX4D/4OXesDbRaVu16hoXwbDm8GSjfpOXuSM8f3YEcg/5o/4kqCNtYfIH/RTWrezY8T9tXj62rh9JHfYLgmI3aY/q5m/H1deJJhSt6SBHHxhsWr/pRJBfcS9pViuKYOjanXdDehvqMUrHqC7GlX1uS8K2LOSWrWVHX29HE5+G42jZXrQXkQO4JpBFnxwK9ZvPqLiXGHCSSQQALjD/8HhAvCbWy/oV4AAAAASUVORK5CYII="

Deploy

bosh -d credhub-webui deploy manifests/deployment.yml \
  -v credhub_webui_hostname=credhubwebui.local \
  -v credhub_client_id=credhub \
  -v credhub_client_secret=secret \
  -v credhub_server=https://credhubserver.local:8844

List Instances

bosh -d credhub-webui vms

Tail logs

bosh -d credhub-webui logs -f

Developing

Get Blobs

The blobs are downloaded directly from the credhub-webui github releases and stored in src/credhub-webui

./get_blobs.sh

Create Release

Create a versioned release tarball, upload to github release with url and sha1sum

VERSION=0.0.1
bosh create-release --version=${VERSION} --tarball=credhub-webui-boshrelease-${VERSION}.tgz
SHA1=$(sha1sum credhub-webui-boshrelease-${VERSION}.tgz | awk '{ print $1 }')
cat << EOF
\`\`\`
- name: credhub-webui
  version: ${VERSION}
  sha1: ${SHA1}
  url: https://github.com/shreddedbacon/credhub-webui-boshrelease/releases/download/v${VERSION}/credhub-webui-boshrelease-${VERSION}.tgz
EOF
\`\`\`