Skip to content

Commit 43f897a

Browse files
committed
initial gcp fixes
1 parent c8a5e6e commit 43f897a

File tree

6 files changed

+17
-30
lines changed

6 files changed

+17
-30
lines changed

aws/build-and-deploy-aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export HELM_EXPERIMENTAL_OCI=1
154154
kubectl create namespace ctfd
155155

156156
# Double base64 encoding to prevent weird character errors in ctfd
157-
helm upgrade --install ctfd -n ctfd oci://ghcr.io/bman46/ctfd/ctfd \
157+
helm upgrade --install ctfd -n ctfd oci://ghcr.io/bman46/ctfd/ctfd --version 0.6.3\
158158
--set="redis.auth.password=$(openssl rand -base64 24 | base64)" \
159159
--set="mariadb.auth.rootPassword=$(openssl rand -base64 24 | base64)" \
160160
--set="mariadb.auth.password=$(openssl rand -base64 24 | base64)" \

gcp/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,7 @@ The bucket name should be in the output. Please use that to configure the Terraf
5151
7. Run `terraform apply`. Note: the apply will take 10 to 20 minutes depending on the speed of the GCP backplane.
5252
8. Run `export USE_GKE_GCLOUD_AUTH_PLUGIN=True`
5353
9. When creation is done, run `gcloud container clusters get-credentials wrongsecrets-exercise-cluster --region YOUR_REGION`. Note if it errors on a missing plugin to support `kubectl`, then run `gcloud components install gke-gcloud-auth-plugin` and `gcloud container clusters get-credentials wrongsecrets-exercise-cluster`.
54-
10. Go to the values of the helm chart and replace the wrongsecrets.config with this:
55-
56-
```yaml
57-
K8S_ENV: "gcp"
58-
```
59-
60-
and replace the value of wrongsecrets.env having the name 'K8S_ENV' with this:
61-
62-
```yaml
63-
value: "gcp"
64-
```
65-
66-
11. Run `./build-and-deploy-gcp.sh`
54+
10. Run `./build-and-deploy-gcp.sh`
6755

6856
Your GKE cluster should be visible in [EU-West4](https://console.cloud.google.com/kubernetes?referrer=search&project=wrongsecrets) by default. Want a different region? You can modify `terraform.tfvars` or input it directly using the `region` variable in plan/apply.
6957

gcp/build-and-deploy-gcp.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,12 @@ echo "You can find the app password in password.txt"
104104

105105
helm upgrade --install wrongsecrets ../helm/wrongsecrets-ctf-party \
106106
--set="balancer.env.K8S_ENV=gcp" \
107+
--set="balancer.tag=1.9.0alpha5-cloud" \
107108
--set="balancer.env.REACT_APP_GCP_BUCKET_URL=https://console.cloud.google.com/storage/browser/${GCP_BUCKET_NAME}" \
108109
--set="balancer.env.REACT_APP_ACCESS_PASSWORD=${APP_PASSWORD}" \
109110
--set="balancer.env.REACT_APP_CREATE_TEAM_HMAC_KEY=${CREATE_TEAM_HMAC}" \
110111
--set="balancer.cookie.cookieParserSecret=${COOKIE_PARSER_SECRET}" \
111-
--set="balancer.env.GCP_PROJECT_ID=${GCP_PROJECT}" \
112-
--set="balancer.repository=osamamagdy/wrongsecrets-balancer" \
113-
--set="balancer.tag=v1.3.5"
112+
--set="balancer.env.GCP_PROJECT_ID=${GCP_PROJECT}"
114113

115114
kubectl annotate serviceaccount \
116115
--namespace default wrongsecrets-balancer \

gcp/secrets.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
resource "google_secret_manager_secret" "wrongsecret_1" {
66
secret_id = "wrongsecret-1"
77
replication {
8-
automatic = true
8+
auto {}
99
}
1010
}
1111

@@ -36,7 +36,7 @@ resource "google_secret_manager_secret_version" "secret_version_basic" {
3636
resource "google_secret_manager_secret" "wrongsecret_2" {
3737
secret_id = "wrongsecret-2"
3838
replication {
39-
automatic = true
39+
auto {}
4040
}
4141
}
4242

@@ -54,7 +54,7 @@ resource "google_secret_manager_secret_iam_member" "wrongsecret_2_member" {
5454
resource "google_secret_manager_secret" "wrongsecret_3" {
5555
secret_id = "wrongsecret-3"
5656
replication {
57-
automatic = true
57+
auto {}
5858
}
5959
}
6060

wrongsecrets-balancer/ui/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wrongsecrets-balancer/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "Apache-2.0",
55
"dependencies": {
66
"@formatjs/intl-utils": "^3.8.4",
7-
"axios": "^1.7.3",
7+
"axios": "^1.7.5",
88
"crypto-js": "^4.2.0",
99
"promise-retry": "^2.0.1",
1010
"react": "^18.3.1",

0 commit comments

Comments
 (0)