Skip to content

Commit

Permalink
Fix docker-compose command after Ubuntu image upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-antoniak committed Aug 22, 2024
1 parent 2c84428 commit 8e80344
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ansible-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
- uses: actions/checkout@v2
- name: Start docker-compose
run: |
docker-compose up -d
docker compose up -d
sleep 720
docker-compose logs
docker compose logs
docker ps -a
docker exec zdm-proxy-automation_client_1 cqlsh zdm-proxy-automation_proxy_1 -e 'select * from system.local;'
docker exec zdm-proxy-automation-client-1 cqlsh zdm-proxy-automation-proxy-1 -e 'select * from system.local;'
4 changes: 2 additions & 2 deletions compose/client-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ echo "Installing cqlsh"
pip install -U cqlsh

echo "Testing cqlsh"
test_conn zdm-proxy-automation_proxy_1
test_conn zdm-proxy-automation-proxy-1

echo "Running SELECT statement"
select_all zdm-proxy-automation_proxy_1
select_all zdm-proxy-automation-proxy-1

echo "Ready"
tail -F /dev/null # keeps container running
32 changes: 16 additions & 16 deletions compose/jumphost-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ if ! id "ubuntu" &>/dev/null; then
echo "Adding proxy servers to SSH known_hosts"
gosu ubuntu touch /home/ubuntu/.ssh/known_hosts

scan_key zdm-proxy-automation_jumphost_1
scan_key zdm-proxy-automation_proxy_1
scan_key zdm-proxy-automation_proxy_2
scan_key zdm-proxy-automation_proxy_3
scan_key zdm-proxy-automation-jumphost-1
scan_key zdm-proxy-automation-proxy-1
scan_key zdm-proxy-automation-proxy-2
scan_key zdm-proxy-automation-proxy-3

test_conn zdm-proxy-automation_proxy_1
test_conn zdm-proxy-automation_proxy_2
test_conn zdm-proxy-automation_proxy_3
test_conn zdm-proxy-automation-proxy-1
test_conn zdm-proxy-automation-proxy-2
test_conn zdm-proxy-automation-proxy-3

# remove shared keys once applied to remote servers
rm /run/keys/*.pub
Expand All @@ -76,14 +76,14 @@ fi
echo "Starting SSH server"
/etc/init.d/ssh start

test_conn zdm-proxy-automation_proxy_1
test_conn zdm-proxy-automation_proxy_2
test_conn zdm-proxy-automation_proxy_3
test_conn zdm-proxy-automation-proxy-1
test_conn zdm-proxy-automation-proxy-2
test_conn zdm-proxy-automation-proxy-3

export PROXY_IP_1=$(get_ip zdm-proxy-automation_proxy_1)
export PROXY_IP_2=$(get_ip zdm-proxy-automation_proxy_2)
export PROXY_IP_3=$(get_ip zdm-proxy-automation_proxy_3)
export JUMPHOST_IP=$(get_ip zdm-proxy-automation_jumphost_1)
export PROXY_IP_1=$(get_ip zdm-proxy-automation-proxy-1)
export PROXY_IP_2=$(get_ip zdm-proxy-automation-proxy-2)
export PROXY_IP_3=$(get_ip zdm-proxy-automation-proxy-3)
export JUMPHOST_IP=$(get_ip zdm-proxy-automation-jumphost-1)

cd /opt/zdm-proxy-automation || return

Expand All @@ -100,9 +100,9 @@ gosu ubuntu ansible-playbook deploy_zdm_proxy.yml -i zdm_ansible_inventory \
-e "origin_password=foo" \
-e "target_username=foo" \
-e "target_password=foo" \
-e "origin_contact_points=zdm-proxy-automation_origin_1" \
-e "origin_contact_points=zdm-proxy-automation-origin-1" \
-e "origin_port=9042" \
-e "target_contact_points=zdm-proxy-automation_target_1" \
-e "target_contact_points=zdm-proxy-automation-target-1" \
-e "target_port=9042"

echo "Ready"
Expand Down

0 comments on commit 8e80344

Please sign in to comment.