Skip to content

Commit

Permalink
Turn on environment setup
Browse files Browse the repository at this point in the history
Co-authored-by: Shwetha Gururaj <gururajsh@vmware.com>
  • Loading branch information
a-b and gururajsh authored Apr 17, 2023
1 parent 548f7ab commit b41dd6c
Showing 1 changed file with 110 additions and 110 deletions.
220 changes: 110 additions & 110 deletions .github/workflows/cf-env-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,113 +61,113 @@ jobs:
name: ${{ steps.claim-toolsmiths-env.outputs.environment-name }}
path: metadata.json

# - name: Checkout cli-ci
# uses: actions/checkout@v3
# with:
# repository: cloudfoundry/cli-ci
# path: cli-ci

# - name: Checkout cf-deployment Min CAPI
# if: ${{ inputs.capi-version != 'edge' }}
# uses: actions/checkout@v3
# with:
# repository: cloudfoundry/cf-deployment
# path: cf-deployment
# ref: ${{ inputs.capi-version }}

# - name: Checkout cf-deployment
# uses: actions/checkout@v3
# if: ${{ inputs.capi-version == 'edge' }}
# with:
# repository: cloudfoundry/cf-deployment
# path: cf-deployment

# - name: Checkout CF deployment tasks
# uses: actions/checkout@v3
# with:
# repository: cloudfoundry/cf-deployment-concourse-tasks
# path: cf-deployment-concourse-tasks

# - name: Install Tools
# run: |
# wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.110/bbl-v8.4.110_linux_x86-64 -P /tmp
# mv /tmp/bbl-* /usr/local/bin/bbl
# chmod +x /usr/local/bin/bbl
# bbl --version

# wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-7.0.1-linux-amd64 --output-document="/usr/local/bin/bosh"
# chmod +x /usr/local/bin/bosh
# bosh --version

# - name: Deploy edge CAPI with Isolation Segment and OIDC Provider
# if: ${{ inputs.capi-version == 'edge' }}
# env:
# CF_INT_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# run: |
# # find latest capi
# FILENAME="$(aws s3 ls capi-releases --no-sign-request --recursive --region us-east-1 | sort | tail -n 1 | awk '{print $4}')"
# aws s3 cp s3://capi-releases/$FILENAME $FILENAME --no-sign-request --region us-east-1
# eval "$(bbl print-env --metadata-file metadata.json)"
# bosh upload-release --sha2 "$FILENAME"
# rm $FILENAME

# # deploy
# bosh -d cf manifest > /tmp/manifest.yml
# bosh interpolate /tmp/manifest.yml \
# -o cf-deployment/operations/test/add-persistent-isolation-segment-diego-cell.yml \
# -o cli-ci/ci/infrastructure/operations/add-oidc-provider.yml \
# -o cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml \
# -o cli-ci/ci/infrastructure/operations/use-latest-capi.yml \
# -v client-secret="${CF_INT_CLIENT_SECRET}" \
# > ./director.yml

# bosh -d cf deploy director.yml -n
# echo "Deployed CAPI version:"
# bosh -d cf releases | grep capi

# - name: Deploy MIN CAPI with Isolation Segment and OIDC Provider
# if: ${{ inputs.capi-version != 'edge' }}
# run: |
# # Creates vars files
# mkdir vars-files
# echo "cs = ${{ secrets.CLIENT_SECRET }}"
# cat << EOF > vars-files/vars.yml
# client-secret: ${{ secrets.CLIENT_SECRET }}
# EOF

# # Copy Ops files
# mkdir ops-files
# cp cf-deployment/operations/test/add-persistent-isolation-segment-diego-cell.yml ops-files/
# cp cli-ci/ci/infrastructure/operations/add-oidc-provider.yml ops-files/
# cp cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml ops-files/

# # Deletes CF-D
# eval "$(bbl print-env --metadata-file metadata.json)"
# bosh -d cf delete-deployment -n

# # Deploy CF-D
# mkdir toolsmiths-env
# cp metadata.json toolsmiths-env/metadata
# cat metadata.json | jq -r .name > toolsmiths-env/name
# export VARS_FILES="vars.yml"
# export MANIFEST_FILE="cf-deployment.yml"
# export SYSTEM_DOMAIN=""
# export REGENERATE_CREDENTIALS=false
# export DEPLOY_WITH_UPTIME_MEASUREMENTS=false
# export MEASURE_SYSLOG_AVAILABILITY=false
# export TCP_DOMAIN=""
# export AVAILABLE_PORT=""
# export FAIL_ON_DOWNTIME=false
# export APP_PUSHABILITY_THRESHOLD=0
# export HTTP_AVAILABILITY_THRESHOLD=0
# export RECENT_LOGS_THRESHOLD=0
# export STREAMING_LOGS_THRESHOLD=0
# export APP_SYSLOG_AVAILABILITY_THRESHOLD=0
# export USE_SINGLE_APP_INSTANCE=false
# export BOSH_DEPLOY_ARGS=""
# export BOSH_LITE=false
# export BBL_JSON_CONFIG=""
# export OPS_FILES="add-persistent-isolation-segment-diego-cell.yml \
# add-uaa-client-credentials.yml \
# add-oidc-provider.yml"
# ./cf-deployment-concourse-tasks/bosh-deploy/task
- name: Checkout cli-ci
uses: actions/checkout@v3
with:
repository: cloudfoundry/cli-ci
path: cli-ci

- name: Checkout cf-deployment Min CAPI
if: ${{ inputs.capi-version != 'edge' }}
uses: actions/checkout@v3
with:
repository: cloudfoundry/cf-deployment
path: cf-deployment
ref: ${{ inputs.capi-version }}

- name: Checkout cf-deployment
uses: actions/checkout@v3
if: ${{ inputs.capi-version == 'edge' }}
with:
repository: cloudfoundry/cf-deployment
path: cf-deployment

- name: Checkout CF deployment tasks
uses: actions/checkout@v3
with:
repository: cloudfoundry/cf-deployment-concourse-tasks
path: cf-deployment-concourse-tasks

- name: Install Tools
run: |
wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.110/bbl-v8.4.110_linux_x86-64 -P /tmp
mv /tmp/bbl-* /usr/local/bin/bbl
chmod +x /usr/local/bin/bbl
bbl --version
wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-7.0.1-linux-amd64 --output-document="/usr/local/bin/bosh"
chmod +x /usr/local/bin/bosh
bosh --version
- name: Deploy edge CAPI with Isolation Segment and OIDC Provider
if: ${{ inputs.capi-version == 'edge' }}
env:
CF_INT_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
run: |
# find latest capi
FILENAME="$(aws s3 ls capi-releases --no-sign-request --recursive --region us-east-1 | sort | tail -n 1 | awk '{print $4}')"
aws s3 cp s3://capi-releases/$FILENAME $FILENAME --no-sign-request --region us-east-1
eval "$(bbl print-env --metadata-file metadata.json)"
bosh upload-release --sha2 "$FILENAME"
rm $FILENAME
# deploy
bosh -d cf manifest > /tmp/manifest.yml
bosh interpolate /tmp/manifest.yml \
-o cf-deployment/operations/test/add-persistent-isolation-segment-diego-cell.yml \
-o cli-ci/ci/infrastructure/operations/add-oidc-provider.yml \
-o cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml \
-o cli-ci/ci/infrastructure/operations/use-latest-capi.yml \
-v client-secret="${CF_INT_CLIENT_SECRET}" \
> ./director.yml
bosh -d cf deploy director.yml -n
echo "Deployed CAPI version:"
bosh -d cf releases | grep capi
- name: Deploy MIN CAPI with Isolation Segment and OIDC Provider
if: ${{ inputs.capi-version != 'edge' }}
run: |
# Creates vars files
mkdir vars-files
echo "cs = ${{ secrets.CLIENT_SECRET }}"
cat << EOF > vars-files/vars.yml
client-secret: ${{ secrets.CLIENT_SECRET }}
EOF
# Copy Ops files
mkdir ops-files
cp cf-deployment/operations/test/add-persistent-isolation-segment-diego-cell.yml ops-files/
cp cli-ci/ci/infrastructure/operations/add-oidc-provider.yml ops-files/
cp cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml ops-files/
# Deletes CF-D
eval "$(bbl print-env --metadata-file metadata.json)"
bosh -d cf delete-deployment -n
# Deploy CF-D
mkdir toolsmiths-env
cp metadata.json toolsmiths-env/metadata
cat metadata.json | jq -r .name > toolsmiths-env/name
export VARS_FILES="vars.yml"
export MANIFEST_FILE="cf-deployment.yml"
export SYSTEM_DOMAIN=""
export REGENERATE_CREDENTIALS=false
export DEPLOY_WITH_UPTIME_MEASUREMENTS=false
export MEASURE_SYSLOG_AVAILABILITY=false
export TCP_DOMAIN=""
export AVAILABLE_PORT=""
export FAIL_ON_DOWNTIME=false
export APP_PUSHABILITY_THRESHOLD=0
export HTTP_AVAILABILITY_THRESHOLD=0
export RECENT_LOGS_THRESHOLD=0
export STREAMING_LOGS_THRESHOLD=0
export APP_SYSLOG_AVAILABILITY_THRESHOLD=0
export USE_SINGLE_APP_INSTANCE=false
export BOSH_DEPLOY_ARGS=""
export BOSH_LITE=false
export BBL_JSON_CONFIG=""
export OPS_FILES="add-persistent-isolation-segment-diego-cell.yml \
add-uaa-client-credentials.yml \
add-oidc-provider.yml"
./cf-deployment-concourse-tasks/bosh-deploy/task

0 comments on commit b41dd6c

Please sign in to comment.