Skip to content

Commit

Permalink
Housekeeping to tidy up the PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBed4d committed Feb 5, 2024
1 parent f6833af commit 7bc735b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 35 deletions.
41 changes: 6 additions & 35 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,10 @@ jobs:
run: terraform init
working-directory: ${{ github.workspace }}/terraform/aio

- name: Create SSH key directory
run: mkdir -p ~/.ssh/

- name: Generate SSH keypair
run: ssh-keygen -f id_rsa -N ''
working-directory: ${{ github.workspace }}/terraform/aio

- name: Copy SSH keypair to ~/.ssh/
run: cp id_rsa* ~/.ssh/
working-directory: ${{ github.workspace }}/terraform/aio


- name: Generate clouds.yaml
run: |
cat << EOF > clouds.yaml
Expand Down Expand Up @@ -227,50 +219,31 @@ jobs:
- name: Pull latest Kayobe image
run: |
docker image pull $KAYOBE_IMAGE
# - name: Find and then test ~/.ssh/id_rsa to see if the file or the repo exists.
# run: |
# find . -type d -name "*ssh*" 2>/dev/null && \
# find . -type f -name "*id_rsa*" 2>/dev/null && \
# sudo ls -ltra ~/.ssh/id_rsa && \
# sudo ls -ltra ~/.ssh/ && \
# env:
# KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Run growroot
run: |
docker run -t --rm -u 1001 \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v ~/.ssh:/.ssh \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

# - name: Debug current working-directory and print permissions
# run: |
# pwd && ls -l && ls -l ../
# env:
# KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Host configure
run: |
docker run -t --rm -u 1001 \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v ~/.ssh:/.ssh \
-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-configure.sh -vvv
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: Service deploy
run: |
docker run -t --rm -u 1001 \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v ~/.ssh:/.ssh \
-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-service-deploy.sh
Expand All @@ -279,9 +252,8 @@ jobs:

- name: Configure aio resources
run: |
docker run -t --rm -u 1001 \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v ~/.ssh:/.ssh \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
Expand All @@ -291,10 +263,9 @@ jobs:
- name: Tempest tests
run: |
mkdir -p tempest-artifacts
docker run -t --rm -u 1001 \
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
-v ~/.ssh:/.ssh \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stackhpc-build-kayobe-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
https_proxy: ${{ inputs.https_proxy }}
no_proxy: ${{ inputs.no_proxy }}

# Setting KAYOBE_USER_UID and KAYOBE_USER_GID to 1001 to match docker's defaults
# so that docker can run as a privileged user within the Kayobe image.
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
Expand Down

0 comments on commit 7bc735b

Please sign in to comment.