Skip to content

Commit

Permalink
fix command everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
benjben committed Dec 16, 2024
1 parent 633b45d commit d4c04bb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ else

if [ "$SP_MINI_SIZE" == "large" ]
then
# prepare env vars for docker-compose
# prepare env vars for docker compose
echo -n > provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_MEM_SIZE=2560m" >> provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_HEAP_SIZE=1280m" >> provisioning/roles/docker/files/.env
Expand All @@ -47,7 +47,7 @@ else
fi
elif [ "$SP_MINI_SIZE" == "xlarge" ]
then
# prepare env vars for docker-compose
# prepare env vars for docker compose
echo -n > provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_MEM_SIZE=5g" >> provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_HEAP_SIZE=2560m" >> provisioning/roles/docker/files/.env
Expand All @@ -69,7 +69,7 @@ else
fi
elif [ "$SP_MINI_SIZE" == "xxlarge" ]
then
# prepare env vars for docker-compose
# prepare env vars for docker compose
echo -n > provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_MEM_SIZE=10g" >> provisioning/roles/docker/files/.env
echo "ELASTICSEARCH_HEAP_SIZE=5g" >> provisioning/roles/docker/files/.env
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
cd $GITHUB_WORKSPACE/provisioning/resources/control-plane
go test *.go
- name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow
limit-access-to-actor: true
## limits ssh access and adds the ssh public keys of the listed GitHub users
limit-access-to-users: benjben
#- name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
# ## limits ssh access and adds the ssh public keys of the listed GitHub users
# limit-access-to-users: benjben

- name: Provision a local Mini instance
run: ansible-playbook -i $GITHUB_WORKSPACE/provisioning/inventory $GITHUB_WORKSPACE/provisioning/local_setup.yml --connection=local --become
Expand Down
4 changes: 2 additions & 2 deletions provisioning/resources/control-plane/restart_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func restartSPService(service string) (error, int) {
} else {
if serviceName, ok := initMap[service]; ok {
restartCommandArgs := []string{"restart", serviceName}
cmd := exec.Command("docker-compose", restartCommandArgs...)
cmd := exec.Command("docker compose", restartCommandArgs...)
cmd.Dir = "/home/ubuntu/snowplow"
err := cmd.Run()
if err != nil {
Expand All @@ -49,7 +49,7 @@ func restartSPService(service string) (error, int) {

func restartSPServices() error {
restartCommandArgs := []string{"-f", "/home/ubuntu/snowplow/docker-compose.yml", "restart"}
cmd := exec.Command("docker-compose", restartCommandArgs...)
cmd := exec.Command("docker compose", restartCommandArgs...)
cmd.Dir = "/home/ubuntu/snowplow"
err := cmd.Run()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions provisioning/resources/init/snowplow_mini.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Type=oneshot
RemainAfterExit=true
WorkingDirectory=/home/ubuntu/snowplow
ExecStartPre=/usr/sbin/service docker restart
ExecStartPre=docker-compose down
ExecStart=docker-compose up -d
ExecStop=docker-compose down
ExecStartPre=docker compose down
ExecStart=docker compose up -d
ExecStop=docker compose down

[Install]
WantedBy=multi-user.target
6 changes: 3 additions & 3 deletions provisioning/roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: Remove previous containerd version
apt: name=containerd.io state=absent

- name: Install docker-compose
- name: Install docker compose v2
apt: name=docker-compose-v2 state=latest

- name: Copy docker-compose.yml and its environment file
Expand All @@ -25,9 +25,9 @@
become: yes
shell: echo "vm.max_map_count=262144" >> /etc/sysctl.conf && service procps restart

- name: Start snowplow mini (docker-compose up)
- name: Start snowplow mini (docker compose up)
become: yes
shell: cd {{main_dir}} && docker-compose up -d && sleep 20
shell: cd {{main_dir}} && docker compose up -d && sleep 20

- name: Wait for Elasticsearch port 9200 to become open on the host, don't start checking for 10 seconds
wait_for:
Expand Down
2 changes: 1 addition & 1 deletion utils/scripts/user_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ password='password'
iglu_server_super_uid='deadbeef-dead-beef-dead-beefdeadbeef'

# DO NOT ALTER BELOW #
docker-compose -f /home/ubuntu/snowplow/docker-compose.yml restart iglu-server
docker compose -f /home/ubuntu/snowplow/docker-compose.yml restart iglu-server
sudo service snowplow_mini_control_plane_api restart

sleep 10
Expand Down

0 comments on commit d4c04bb

Please sign in to comment.