-
Notifications
You must be signed in to change notification settings - Fork 1
dry run of gcp deploy with automated domain creation #10
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7403b24
dry run of gcp deploy with automated domain creation
phrocker 47e7267
minor updates
phrocker 4346659
Make it simpler to create the domain
phrocker bc4c3df
Add managed certificate ( did not work yet)
phrocker 9e25b65
what the hell
phrocker 485d874
updates
phrocker 98313ee
allow actuator health
phrocker c339153
better deployment
phrocker 6f76924
minor fixes
phrocker ed02fd0
commit
phrocker 0bbc2e7
commit
phrocker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| SENTRIUS_VERSION=1.0.9 | ||
| SENTRIUS_VERSION=1.0.10 | ||
| SENTRIUS_SSH_VERSION=1.0.2 | ||
| SENTRIUS_KEYCLOAK_VERSION=1.0.2 | ||
| SENTRIUS_AGENT_VERSION=1.0.10 | ||
| SENTRIUS_KEYCLOAK_VERSION=1.0.3 | ||
| SENTRIUS_AGENT_VERSION=1.0.11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #!/bin/bash | ||
| NAMESPACE=sentrius | ||
| CLUSTER=sentrius-autopilot-cluster-1 | ||
| REGION=us-east1 | ||
| REGION=us-east1 | ||
| ZONE=sentrius-cloud |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
| SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
|
|
||
| source ${SCRIPT_DIR}/base.sh | ||
|
|
||
| TENANT=$1 | ||
|
|
||
| gcloud dns record-sets transaction start --zone=${ZONE} | ||
| gcloud dns record-sets transaction add --zone=${ZONE} \ | ||
| --name=${TENANT}.sentrius.cloud. \ | ||
| --type=CNAME \ | ||
| --ttl=300 \ | ||
| app-loadbalancer.region.cloud.goog && | ||
| gcloud dns record-sets transaction execute --zone=${ZONE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/bash | ||
| SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
|
|
||
| source ${SCRIPT_DIR}/base.sh | ||
|
|
||
| DOMAIN=$1 | ||
|
|
||
| gcloud dns record-sets transaction start --zone=${ZONE} | ||
| gcloud dns record-sets transaction remove --zone=${ZONE} \ | ||
| --name=${DOMAIN}.sentrius.cloud --type=A --ttl=300 | ||
| gcloud dns record-sets transaction execute --zone=${ZONE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/bin/bash | ||
|
|
||
| SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
|
|
||
| source ${SCRIPT_DIR}/base.sh | ||
| source ${SCRIPT_DIR}/../../.gcp.env | ||
|
|
||
| TENANT=$1 | ||
|
|
||
| if [[ -z "$TENANT" ]]; then | ||
| echo "Must provide single argument for tenant name" 1>&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Check if namespace exists | ||
| kubectl get namespace ${TENANT} >/dev/null 2>&1 | ||
| if [[ $? -ne 0 ]]; then | ||
| echo "Namespace ${TENANT} does not exist. Creating..." | ||
| kubectl create namespace ${TENANT} || { echo "Failed to create namespace ${TENANT}"; exit 1; } | ||
| fi | ||
|
|
||
|
|
||
|
|
||
| helm template ${TENANT} ./sentrius-gcp-chart/ --values sentrius-gcp-chart/values.yaml \ | ||
| --set tenant=${TENANT} \ | ||
| --set subdomain=${TENANT}.sentrius.cloud \ | ||
| --set sentrius.image.repository=us-central1-docker.pkg.dev/sentrius-project/sentrius-repo/sentrius \ | ||
| --set sentrius.image.tag=${SENTRIUS_VERSION} \ | ||
| --set ssh.image.repository=us-central1-docker.pkg.dev/sentrius-project/sentrius-repo/sentrius-ssh \ | ||
| --set ssh.image.tag=${SENTRIUS_SSH_VERSION} \ | ||
| --set keycloak.image.repository=us-central1-docker.pkg.dev/sentrius-project/sentrius-repo/sentrius-keycloak \ | ||
| --set keycloak.image.tag=${SENTRIUS_KEYCLOAK_VERSION} \ | ||
| --set sentriusagent.image.repository=us-central1-docker.pkg.dev/sentrius-project/sentrius-repo/sentrius-agent \ | ||
| --set sentriusagent.image.tag=${SENTRIUS_AGENT_VERSION} || { echo "Failed to deploy Sentrius with Helm"; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| apiVersion: networking.k8s.io/v1 | ||
| kind: Ingress | ||
| metadata: | ||
| name: managed-cert-ingress-canary | ||
| namespace: canary | ||
| annotations: | ||
| kubernetes.io/ingress.class: gce | ||
| kubernetes.io/ingress.allow-http: "false" | ||
| networking.gke.io/managed-certificates: wildcard-cert | ||
| spec: | ||
| rules: | ||
| - host: keycloak.{{ .Values.tenant }}.sentrius.cloud | ||
| http: | ||
| paths: | ||
| - path: / | ||
| pathType: Prefix | ||
| backend: | ||
| service: | ||
| name: {{ .Release.Name }}-keycloak | ||
| port: | ||
| number: 8081 | ||
| - host: {{ .Values.tenant }}.sentrius.cloud | ||
| http: | ||
| paths: | ||
| - path: / | ||
| pathType: Prefix | ||
| backend: | ||
| service: | ||
| name: {{ .Release.Name }}-sentrius | ||
| port: | ||
| number: 8080 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use port from values.