Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP Pipeline Fixes #379

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/gcp-experiment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
gcloud compute instances create litmus-e2e-first-vm-${{ github.run_number }} litmus-e2e-second-vm-${{ github.run_number }} \
--machine-type=f1-micro \
--zone=us-central1-a
--zone=us-east1-b

- name: Litmus Infra Setup
if: always()
Expand All @@ -84,7 +84,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
VM_INSTANCE_NAMES: "litmus-e2e-first-vm-${{ github.run_number }},litmus-e2e-second-vm-${{ github.run_number }}"
INSTANCE_ZONES: "us-central1-a,us-central1-a"
INSTANCE_ZONES: "us-east1-b,us-east1-b"
EXPERIMENT_IMAGE: "${{ github.event.inputs.experimentImage }}"
EXPERIMENT_IMAGE_PULL_POLICY: "${{ github.event.inputs.experimentImagePullPolicy }}"
CHAOS_NAMESPACE: "${{ github.event.inputs.chaosNamespace }}"
Expand All @@ -94,7 +94,7 @@ jobs:
if: always()
run: |
gcloud compute instances delete litmus-e2e-first-vm-${{ github.run_number }} litmus-e2e-second-vm-${{ github.run_number }} \
--zone=us-central1-a \
--zone=us-east1-b \
neelanjan00 marked this conversation as resolved.
Show resolved Hide resolved
--quiet

- name: "[Debug]: check chaos resources"
Expand Down Expand Up @@ -175,9 +175,9 @@ jobs:
run: |
gcloud compute instances create litmus-e2e-vm-${{ github.run_number }} \
--machine-type=f1-micro \
--zone=us-central1-a \
--create-disk name=litmus-e2e-first-disk-${{ github.run_number }},size=1GB,device-name=litmus-e2e-first-disk-${{ github.run_number }} \
--create-disk name=litmus-e2e-second-disk-${{ github.run_number }},size=1GB,device-name=litmus-e2e-second-disk-${{ github.run_number }}
--zone=us-east1-b \
--create-disk name=litmus-e2e-first-disk-${{ github.run_number }},size=1GB \
--create-disk name=litmus-e2e-second-disk-${{ github.run_number }},size=1GB

- name: Litmus Infra Setup
if: always()
Expand All @@ -191,8 +191,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
DISK_VOLUME_NAMES: "litmus-e2e-first-disk-${{ github.run_number }},litmus-e2e-second-disk-${{ github.run_number }}"
DISK_ZONES: "us-central1-a,us-central1-a"
DEVICE_NAMES: "litmus-e2e-first-disk-${{ github.run_number }},litmus-e2e-second-disk-${{ github.run_number }}"
DISK_ZONES: "us-east1-b,us-east1-b"
EXPERIMENT_IMAGE: "${{ github.event.inputs.experimentImage }}"
EXPERIMENT_IMAGE_PULL_POLICY: "${{ github.event.inputs.experimentImagePullPolicy }}"
CHAOS_NAMESPACE: "${{ github.event.inputs.chaosNamespace }}"
Expand All @@ -202,7 +201,7 @@ jobs:
if: always()
run: |
gcloud compute instances delete litmus-e2e-vm-${{ github.run_number }} \
--zone=us-central1-a \
--zone=us-east1-b \
--delete-disks=all \
--quiet

Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/nightly-gcp-experiment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
gcloud compute instances create litmus-e2e-first-vm-${{ github.run_number }} litmus-e2e-second-vm-${{ github.run_number }} \
--machine-type=f1-micro \
--zone=us-central1-a
--zone=us-east1-b

- name: Litmus Infra Setup
if: always()
Expand All @@ -73,14 +73,14 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
VM_INSTANCE_NAMES: "litmus-e2e-first-vm-${{ github.run_number }},litmus-e2e-second-vm-${{ github.run_number }}"
INSTANCE_ZONES: "us-central1-a,us-central1-a"
INSTANCE_ZONES: "us-east1-b,us-east1-b"
run: make gcp-vm-instance-stop

- name: Delete target GCP VM Instances
if: always()
run: |
gcloud compute instances delete litmus-e2e-first-vm-${{ github.run_number }} litmus-e2e-second-vm-${{ github.run_number }} \
--zone=us-central1-a \
--zone=us-east1-b \
--quiet

- name: "[Debug]: check chaos resources"
Expand Down Expand Up @@ -161,9 +161,9 @@ jobs:
run: |
gcloud compute instances create litmus-e2e-vm-${{ github.run_number }} \
--machine-type=f1-micro \
--zone=us-central1-a \
--create-disk name=litmus-e2e-first-disk-${{ github.run_number }},size=1GB,device-name=litmus-e2e-first-disk-${{ github.run_number }} \
--create-disk name=litmus-e2e-second-disk-${{ github.run_number }},size=1GB,device-name=litmus-e2e-second-disk-${{ github.run_number }}
--zone=us-east1-b \
--create-disk name=litmus-e2e-first-disk-${{ github.run_number }},size=1GB \
--create-disk name=litmus-e2e-second-disk-${{ github.run_number }},size=1GB

- name: Litmus Infra Setup
if: always()
Expand All @@ -174,15 +174,14 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
DISK_VOLUME_NAMES: "litmus-e2e-first-disk-${{ github.run_number }},litmus-e2e-second-disk-${{ github.run_number }}"
DISK_ZONES: "us-central1-a,us-central1-a"
DEVICE_NAMES: "litmus-e2e-first-disk-${{ github.run_number }},litmus-e2e-second-disk-${{ github.run_number }}"
DISK_ZONES: "us-east1-b,us-east1-b"
run: make gcp-vm-disk-loss

- name: Delete the VM Instance and target Disk Volumes
if: always()
run: |
gcloud compute instances delete litmus-e2e-vm-${{ github.run_number }} \
--zone=us-central1-a \
--zone=us-east1-b \
--delete-disks=all \
--quiet

Expand Down
1 change: 0 additions & 1 deletion pkg/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func GetENV(testDetails *types.TestDetails, expName, engineName string) {
testDetails.InstanceZones = Getenv("INSTANCE_ZONES", "")
testDetails.DiskVolumeNames = Getenv("DISK_VOLUME_NAMES", "")
testDetails.DiskZones = Getenv("DISK_ZONES", "")
testDetails.DeviceNames = Getenv("DEVICE_NAMES", "")
testDetails.VMIds = Getenv("APP_VM_MOIDS", "")
testDetails.Region = Getenv("REGION", "us-west-1")
testDetails.UpdateWebsite = Getenv("UPDATE_WEBSITE", "false")
Expand Down
3 changes: 1 addition & 2 deletions pkg/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ func setEngineVar(chaosEngine *v1alpha1.ChaosEngine, testsDetails *types.TestDet
case "gcp-vm-disk-loss":
envDetails.SetEnv("GCP_PROJECT_ID", testsDetails.GCPProjectID).
SetEnv("DISK_VOLUME_NAMES", testsDetails.DiskVolumeNames).
SetEnv("DISK_ZONES", testsDetails.DiskZones).
SetEnv("DEVICE_NAMES", testsDetails.DeviceNames)
SetEnv("DISK_ZONES", testsDetails.DiskZones)
case "vm-poweroff":
envDetails.SetEnv("APP_VM_MOIDS", testsDetails.VMIds)
case "process-kill":
Expand Down
1 change: 0 additions & 1 deletion pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ type TestDetails struct {
InstanceZones string
DiskVolumeNames string
DiskZones string
DeviceNames string
VMIds string
Region string
Lib string
Expand Down