Case Study "Unfurl Technology Shop" #5
Workflow file for this run
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
name: Case Study "Unfurl Technology" | |
on: | |
workflow_dispatch: | |
jobs: | |
################################################### | |
# | |
# Kubernetes | |
# | |
################################################### | |
kubernetes: | |
name: Kubernetes | |
runs-on: ubuntu-22.04 | |
env: | |
ORCHESTRATOR: unfurl | |
EXAMPLE: unfurl-technology-conditional-quality-maintenance | |
ENV: K8S | |
PORT: 30080 | |
steps: | |
################################################### | |
# | |
# Prepare | |
# | |
################################################### | |
- name: (PREPARE) Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: (PREPARE) Start minikube | |
uses: medyagh/[email protected] | |
- name: (PREPARE) Install Vintner | |
uses: ./.github/actions/vintner-install | |
with: | |
gcp_service_account_file: ${{ secrets.GCP_SERVICE_ACCOUNT_FILE }} | |
os_ssh_key_file: ${{ secrets.OS_SSH_KEY_FILE }} | |
os_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
os_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
- name: (VINTNER) Configure setup | |
uses: ./.github/actions/vintner-setup | |
with: | |
orchestrator: ${{ env.ORCHESTRATOR }} | |
- name: (VINTNER) Assign variability inputs | |
run: | | |
cat << EOF > /tmp/variability-inputs.yaml | |
env: KUBERNETES | |
medium: false | |
optional_feature: true | |
premium_feature: true | |
EOF | |
- name: (VINTNER) Resolve variability | |
uses: ./.github/actions/vintner-resolve | |
with: | |
example: ${{ env.EXAMPLE }} | |
- name: (VINTNER) Assign deployment inputs | |
run: | | |
cat << EOF > /tmp/deployment-inputs.yaml | |
database_password: ${DB_PASSWORD} | |
k8s_api_port: $(minikube ip) | |
k8s_ca_cert_file: /home/runner/.minikube/ca.crt | |
k8s_client_cert_file: /home/runner/.minikube/profiles/minikube/client.crt | |
k8s_client_key_file: /home/runner/.minikube/profiles/minikube/client.key | |
EOF | |
env: | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
- name: (VINTNER) Validate application | |
uses: ./.github/actions/vintner-validate | |
- name: (VINTNER) Deploy application | |
uses: ./.github/actions/vintner-deploy | |
- name: (VINTNER) Test application | |
uses: ./.github/actions/vintner-test | |
with: | |
example: ${{ env.EXAMPLE }} | |
env: ${{ env.ENV }} | |
port: ${{ env.PORT }} | |
- name: (VINTNER) Undeploy application | |
uses: ./.github/actions/vintner-undeploy | |
if: always() | |
################################################### | |
# | |
# GCP | |
# | |
################################################### | |
gcp: | |
name: GCP | |
runs-on: ubuntu-22.04 | |
if: false | |
env: | |
ORCHESTRATOR: unfurl | |
EXAMPLE: unfurl-technology-conditional-quality-maintenance | |
ENV: GCP | |
PORT: 80 | |
steps: | |
################################################### | |
# | |
# Prepare | |
# | |
################################################### | |
- name: (PREPARE) Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: (PREPARE) Install Vintner | |
uses: ./.github/actions/vintner-install | |
with: | |
gcp_service_account_file: ${{ secrets.GCP_SERVICE_ACCOUNT_FILE }} | |
os_ssh_key_file: ${{ secrets.OS_SSH_KEY_FILE }} | |
os_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
os_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
- name: (VINTNER) Configure setup | |
uses: ./.github/actions/vintner-setup | |
with: | |
orchestrator: ${{ env.ORCHESTRATOR }} | |
- name: (VINTNER) Assign variability inputs | |
run: | | |
cat << EOF > /tmp/variability-inputs.yaml | |
env: ELASTIC | |
medium: false | |
optional_feature: true | |
premium_feature: true | |
EOF | |
- name: (VINTNER) Resolve variability | |
uses: ./.github/actions/vintner-resolve | |
with: | |
example: ${{ env.EXAMPLE }} | |
- name: (VINTNER) Assign deployment inputs | |
run: | | |
cat << EOF > /tmp/deployment-inputs.yaml | |
database_password: ${DB_PASSWORD} | |
gcp_region: ${GCP_REGION} | |
gcp_service_account_file: /tmp/gcp-service-account-file.json | |
gcp_project: ${GCP_PROJECT} | |
EOF | |
env: | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
GCP_REGION: ${{ secrets.GCP_REGION }} | |
GCP_PROJECT: ${{ secrets.GCP_PROJECT }} | |
- name: (VINTNER) Validate application | |
uses: ./.github/actions/vintner-validate | |
- name: (VINTNER) Deploy application | |
uses: ./.github/actions/vintner-deploy | |
- name: (VINTNER) Test application | |
uses: ./.github/actions/vintner-test | |
with: | |
example: ${{ env.EXAMPLE }} | |
env: ${{ env.ENV }} | |
port: ${{ env.PORT }} | |
- name: (VINTNER) Undeploy application | |
uses: ./.github/actions/vintner-undeploy | |
if: always() | |
################################################### | |
# | |
# OpenStack | |
# | |
################################################### | |
openstack: | |
name: OpenStack | |
runs-on: ubuntu-22.04 | |
env: | |
ORCHESTRATOR: unfurl | |
EXAMPLE: unfurl-technology-conditional-quality-maintenance | |
ENV: OS | |
PORT: 80 | |
steps: | |
################################################### | |
# | |
# Prepare | |
# | |
################################################### | |
- name: (PREPARE) Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: (PREPARE) Install Vintner | |
uses: ./.github/actions/vintner-install | |
with: | |
gcp_service_account_file: ${{ secrets.GCP_SERVICE_ACCOUNT_FILE }} | |
os_ssh_key_file: ${{ secrets.OS_SSH_KEY_FILE }} | |
os_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
os_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
- name: (VINTNER) Configure setup | |
uses: ./.github/actions/vintner-setup | |
with: | |
orchestrator: ${{ env.ORCHESTRATOR }} | |
- name: (VINTNER) Assign variability inputs | |
run: | | |
cat << EOF > /tmp/variability-inputs.yaml | |
env: STATIC | |
medium: true | |
optional_feature: true | |
premium_feature: true | |
EOF | |
- name: (VINTNER) Resolve variability | |
uses: ./.github/actions/vintner-resolve | |
with: | |
example: ${{ env.EXAMPLE }} | |
- name: (VINTNER) Assign deployment inputs | |
run: | | |
cat << EOF > /tmp/deployment-inputs.yaml | |
database_password: ${DB_PASSWORD} | |
os_network: ${OS_NETWORK} | |
os_ssh_key_name: ${OS_SSH_KEY_NAME} | |
os_ssh_user: ${OS_SSH_USER} | |
os_ssh_key_file: /tmp/os-ssh-key-file | |
os_region_name: ${OS_REGION_NAME} | |
os_auth_type: ${OS_AUTH_TYPE} | |
os_auth_url: ${OS_AUTH_URL} | |
os_identity_api_version: '${OS_IDENTITY_API_VERSION}' | |
os_interface: ${OS_INTERFACE} | |
os_application_credential_id: ${OS_APPLICATION_CREDENTIAL_ID} | |
os_application_credential_secret: ${OS_APPLICATION_CREDENTIAL_SECRET} | |
EOF | |
env: | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
OS_NETWORK: ${{ secrets.OS_NETWORK }} | |
OS_SSH_KEY_NAME: ${{ secrets.OS_SSH_KEY_NAME }} | |
OS_SSH_USER: ${{ secrets.OS_SSH_USER }} | |
OS_REGION_NAME: ${{ secrets.OS_REGION_NAME }} | |
OS_AUTH_TYPE: ${{ secrets.OS_AUTH_TYPE }} | |
OS_AUTH_URL: ${{ secrets.OS_AUTH_URL }} | |
OS_IDENTITY_API_VERSION: ${{ secrets.OS_IDENTITY_API_VERSION }} | |
OS_INTERFACE: ${{ secrets.OS_INTERFACE }} | |
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
- name: (VINTNER) Validate application | |
uses: ./.github/actions/vintner-validate | |
- name: (VINTNER) Deploy application | |
uses: ./.github/actions/vintner-deploy | |
- name: (VINTNER) Test application | |
uses: ./.github/actions/vintner-test | |
with: | |
example: ${{ env.EXAMPLE }} | |
env: ${{ env.ENV }} | |
port: ${{ env.PORT }} | |
- name: (VINTNER) Undeploy application | |
uses: ./.github/actions/vintner-undeploy | |
if: always() |