-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial steps on getting some deployment scripts
- Loading branch information
Showing
27 changed files
with
647 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Submodule helm
updated
84 files
This file contains 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 @@ | ||
Chart.lock |
This file contains 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,27 @@ | ||
apiVersion: v2 | ||
name: install | ||
description: Installer wrapper | ||
keywords: | ||
- IoT | ||
home: https://drogue.io | ||
icon: https://blog.drogue.io/favicon.svg | ||
|
||
maintainers: | ||
- name: ctron | ||
email: [email protected] | ||
url: https://dentrassi.de | ||
|
||
type: application | ||
|
||
version: 0.5.0 | ||
|
||
kubeVersion: ">= 1.19.0-0" | ||
|
||
dependencies: | ||
- name: drogue-cloud-common | ||
version: ^0.6.0-alpha1 | ||
repository: file://../helm/charts/drogue-cloud-common | ||
- name: drogue-cloud-twin | ||
version: ^0.6.0-alpha1 | ||
alias: drogueCloudTwin | ||
repository: file://../helm/charts/drogue-cloud-twin |
This file contains 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 @@ | ||
* |
Empty file.
This file contains 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,17 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
kubeadmConfigPatches: | ||
- | | ||
kind: InitConfiguration | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
node-labels: "ingress-ready=true" | ||
extraPortMappings: | ||
- containerPort: 80 | ||
hostPort: 80 | ||
protocol: TCP | ||
- containerPort: 443 | ||
hostPort: 443 | ||
protocol: TCP |
This file contains 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,23 @@ | ||
# use in combination with the openshift.yaml file | ||
|
||
global: | ||
drogueCloud: | ||
keycloak: | ||
insecure: true | ||
|
||
drogueCloudTwin: | ||
|
||
services: | ||
api: | ||
ingress: | ||
insecure: true | ||
port: 80 | ||
|
||
backend: | ||
service: | ||
insecure: true | ||
|
||
sso: | ||
ingress: | ||
insecure: true | ||
port: 80 |
This file contains 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,7 @@ | ||
drogueCloudTwin: | ||
postgres: | ||
podSecurityContext: | ||
enabled: true | ||
fsGroup: 2000 | ||
runAsNonRoot: true | ||
runAsUser: 1000 |
This file contains 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,25 @@ | ||
|
||
# Ports might seem a bit off, but they must be in the range of 30000-32767 | ||
|
||
global: | ||
drogueCloud: | ||
keycloak: | ||
insecure: true | ||
|
||
drogueCloudTwin: | ||
|
||
services: | ||
|
||
api: | ||
ingress: | ||
insecure: true | ||
port: 80 | ||
|
||
backend: | ||
service: | ||
insecure: true | ||
|
||
sso: | ||
ingress: | ||
insecure: true | ||
port: 80 |
This file contains 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,29 @@ | ||
|
||
# Ports might seem a bit off, but they must be in the range of 30000-32767 | ||
|
||
global: | ||
drogueCloud: | ||
keycloak: | ||
insecure: true | ||
|
||
drogueCloudTwin: | ||
|
||
defaults: | ||
ingress: | ||
className: nginx | ||
|
||
services: | ||
|
||
api: | ||
ingress: | ||
insecure: true | ||
port: 80 | ||
|
||
backend: | ||
service: | ||
insecure: true | ||
|
||
sso: | ||
ingress: | ||
insecure: true | ||
port: 80 |
This file contains 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,3 @@ | ||
global: | ||
drogueCloud: | ||
useServiceCa: true |
This file contains 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 @@ | ||
local-values.yaml |
File renamed without changes.
This file contains 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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# FIXME: find a way to detect endpoints | ||
|
||
# API_URL="$(get_env deploy/console-backend endpoint ENDPOINTS__API_URL)" | ||
# SSO_URL="$(get_env deploy/console-backend endpoint SSO_URL)" |
This file contains 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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
: "${NGINX_VERSION:=1.1.0}" | ||
|
||
echo "Installing NGINX Ingress Controller: ${NGINX_VERSION}" | ||
progress "📦 Deploying pre-requisites (NGINX Ingress Controller v${NGINX_VERSION}) ... " | ||
|
||
progress -n " 🏗 Deploying operator ... " | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v${NGINX_VERSION}/deploy/static/provider/kind/deploy.yaml | ||
progress "done!" | ||
|
||
if [[ "$MINIMIZE" == true ]]; then | ||
kubectl -n ingress-nginx set resources deployment ingress-nginx-controller --requests=cpu=0 | ||
fi | ||
|
||
progress -n " ⏳ Waiting for the operator to become ready ... " | ||
kubectl wait --namespace ingress-nginx --for=condition=Available deployment ingress-nginx-controller | ||
progress "done!" |
This file contains 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,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Install the keycloak operator | ||
# | ||
|
||
set -e | ||
|
||
: "${KEYCLOAK_OPERATOR_VERSION:=18.0.1}" | ||
: "${KEYCLOAK_CRDS:=true}" | ||
|
||
progress "📦 Deploying pre-requisites (Keycloak v${KEYCLOAK_OPERATOR_VERSION}) ... " | ||
|
||
if [[ "$KEYCLOAK_CRDS" == true ]]; then | ||
|
||
progress -n " 🗂 Deploying CRDs ... " | ||
|
||
kubectl apply \ | ||
-f "https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/${KEYCLOAK_OPERATOR_VERSION}/kubernetes/keycloaks.k8s.keycloak.org-v1.yml" \ | ||
-f "https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/${KEYCLOAK_OPERATOR_VERSION}/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml" | ||
progress "done!" | ||
|
||
fi | ||
|
||
progress -n " 🏗 Deploying the operator ... " | ||
kubectl -n "$DROGUE_NS" apply \ | ||
-f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/${KEYCLOAK_OPERATOR_VERSION}/kubernetes/kubernetes.yml | ||
progress "done!" | ||
|
||
progress -n " ⏳ Waiting for the operator to become ready ... " | ||
kubectl -n "$DROGUE_NS" wait deployment keycloak-operator --for=condition=Available --timeout=-1s | ||
progress "done!" |
This file contains 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,48 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
: "${KAFKA_NS:=kafka}" | ||
: "${STRIMZI_VERSION:=0.30.0}" | ||
|
||
echo "Installing Strimzi: ${STRIMZI_VERSION}" | ||
progress "📦 Deploying pre-requisites (Strimzi v${STRIMZI_VERSION}) ... " | ||
|
||
# | ||
# Strimzi | ||
# | ||
if ! kubectl get ns $KAFKA_NS >/dev/null 2>&1; then | ||
progress -n " 🆕 Creating namespace ... " | ||
kubectl create ns $KAFKA_NS | ||
progress "done!" | ||
fi | ||
if ! kubectl -n $KAFKA_NS get deploy/strimzi-cluster-operator >/dev/null 2>&1; then | ||
progress -n " 🏗 Deploying the operator ... " | ||
# use "kubectl create" -> https://github.com/strimzi/strimzi-kafka-operator/issues/4589 | ||
curl -sL "https://github.com/strimzi/strimzi-kafka-operator/releases/download/${STRIMZI_VERSION}/strimzi-cluster-operator-${STRIMZI_VERSION}.yaml" | | ||
sed "s/myproject/${KAFKA_NS}/" | | ||
kubectl create -n $KAFKA_NS -f - | ||
|
||
# the following is required to watch all namespaces | ||
kubectl -n $KAFKA_NS set env deploy/strimzi-cluster-operator STRIMZI_NAMESPACE=\* | ||
if ! kubectl get clusterrolebinding strimzi-cluster-operator-namespaced >/dev/null 2>&1; then | ||
kubectl create clusterrolebinding strimzi-cluster-operator-namespaced \ | ||
--clusterrole=strimzi-cluster-operator-namespaced \ | ||
--serviceaccount $KAFKA_NS:strimzi-cluster-operator | ||
kubectl create clusterrolebinding strimzi-cluster-operator-entity-operator-delegation \ | ||
--clusterrole=strimzi-entity-operator \ | ||
--serviceaccount $KAFKA_NS:strimzi-cluster-operator | ||
kubectl create clusterrolebinding strimzi-cluster-operator-topic-operator-delegation \ | ||
--clusterrole=strimzi-topic-operator \ | ||
--serviceaccount $KAFKA_NS:strimzi-cluster-operator | ||
fi | ||
progress "done!" | ||
fi | ||
|
||
if [[ "$MINIMIZE" == true ]]; then | ||
kubectl -n "$KAFKA_NS" set resources deployment strimzi-cluster-operator --requests=cpu=0 | ||
fi | ||
|
||
progress -n " ⏳ Waiting for the operator to become ready ... " | ||
kubectl wait deployment --all --timeout=-1s --for=condition=Available -n "$KAFKA_NS" | ||
progress "done!" |
Oops, something went wrong.