Skip to content

Commit

Permalink
Update compute engine script (#3040)
Browse files Browse the repository at this point in the history
* update compute engine script

* fix test gcp dm wf

* fix test gcp dm wf
  • Loading branch information
gurevichdmitry authored Feb 19, 2025
1 parent d11abd3 commit 581c207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-gcp-dm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
id: cspm-gcp-integration
working-directory: ${{ env.INTEGRATIONS_SETUP_DIR }}
env:
AGENT_VERSION: ${{ env.ELK_VERSION }}
STACK_VERSION: ${{ env.ELK_VERSION }}
DEPLOYMENT_NAME: ${{env.GCP_DEPLOYMENT_NAME}}
run: |
Expand Down Expand Up @@ -188,6 +189,7 @@ jobs:
- name: Deploy GCP Service Account and Agent
id: gcp_deploy
env:
AGENT_VERSION: ${{ env.ELK_VERSION }}
STACK_VERSION: ${{ env.ELK_VERSION }}
run: |
# Deploys a GCP Service Account
Expand Down
8 changes: 5 additions & 3 deletions deploy/deployment-manager/compute_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def generate_config(context):
},
}

cmnd = "sudo ./elastic-agent install --non-interactive"
if agent_version.startswith("9."):
cmnd = f"{cmnd} --install-servers"

instance = {
"name": deployment_name,
"type": "compute.v1.instance",
Expand Down Expand Up @@ -89,9 +93,7 @@ def generate_config(context):
f"curl -L -O {artifact_server}/$ElasticAgentArtifact.tar.gz\n",
"tar xzvf $ElasticAgentArtifact.tar.gz\n",
"cd $ElasticAgentArtifact\n",
"sudo ./elastic-agent install ",
"--non-interactive --install-servers ",
f"--url={fleet_url} --enrollment-token={enrollment_token}",
f"{cmnd} --url={fleet_url} --enrollment-token={enrollment_token}",
],
),
},
Expand Down

0 comments on commit 581c207

Please sign in to comment.