Skip to content

Commit

Permalink
management cluster working, removing debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
scrungus committed May 4, 2023
1 parent 7f12626 commit ea3c664
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/stackhpc-capi-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ jobs:
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Get IP
- name: Get IP of AIO
id: ip
run: |
export IP=$(python3 -m ansible adhoc localhost -m debug -a "var=access_ip_v4.value" -e @etc/kayobe/environments/$KAYOBE_ENVIRONMENT/tf-outputs.yml | grep access_ip_v4.value | awk '{print $2}' | tr -d \''"\')
echo $IP
echo "ip=$(echo $IP)" >> $GITHUB_OUTPUT
- name: Copy mgmt script outside of checkout
- name: Tar management cluster setup script
run: |
mkdir ./script
cp .automation/scripts/capi-mgmt.sh ./script/
Expand All @@ -223,27 +223,19 @@ jobs:
key: ${{ steps.ssh_key.outputs.ssh_key }}
source: mgmt_deploy.tar
target: /tmp/

- name: ls tmp
run: |
ls /tmp
ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$IP -i terraform/aio/id_rsa 'sudo ls /tmp'
env:
SSH_USERNAME: "${{ inputs.ssh_username }}"
IP: ${{ steps.ip.outputs.ip }}


- name: Install management cluster
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-command-run.sh --command 'sudo tar -xvf /tmp/mgmt_deploy.tar && sudo ls /tmp && ls ./script/ && sudo chmod +x ./script/capi-mgmt.sh && ./script/capi-mgmt.sh' -l controllers --show-output
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-command-run.sh --command 'sudo tar -xvf /tmp/mgmt_deploy.tar && sudo chmod +x ./script/capi-mgmt.sh && ./script/capi-mgmt.sh' -l controllers --show-output
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Get kubeconfig
id: kubeconfig
run: |
export KUBECONFIG=$(ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$IP -i terraform/aio/id_rsa 'sudo cat /etc/rancher/k3s/k3s.yaml')
echo "$KUBECONFIG"
Expand All @@ -260,21 +252,23 @@ jobs:
run: |
echo $KUBECONFIG > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/kolla/config/magnum/kubeconfig
cat etc/kayobe/environments/$KAYOBE_ENVIRONMENT/kolla/config/magnum/kubeconfig
env:
KUBECONFIG: ${{ steps.kubeconfig.outputs.kubeconfig }}

# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
- name: Pull latest Kayobe image
run: |
sudo docker image pull $KAYOBE_IMAGE
# - name: Magnum container build
# run: |
# sudo -E docker run -t --rm \
# -v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
# -e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
# $KAYOBE_IMAGE \
# /stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-container-image-build.sh magnum -vvvv
# env:
# KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
- name: Magnum container build
run: |
sudo -E docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-container-image-build.sh magnum -vvvv
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Service deploy
run: |
Expand Down

0 comments on commit ea3c664

Please sign in to comment.