Skip to content

Instantly share code, notes, and snippets.

@nelsonsilva
Created April 29, 2020 22:42
Show Gist options
  • Select an option

  • Save nelsonsilva/da8dde424f917cb7a5f869ba93c8dc08 to your computer and use it in GitHub Desktop.

Select an option

Save nelsonsilva/da8dde424f917cb7a5f869ba93c8dc08 to your computer and use it in GitHub Desktop.
#!/bin/sh
# build kind cluster
if kind get clusters | grep "nuxeo" >/dev/null; then
kind delete cluster --name nuxeo
fi
# https://kind.sigs.k8s.io/docs/user/ingress/#create-cluster
cat <<EOF | kind create cluster --wait 2m --name nuxeo --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
authorization-mode: "AlwaysAllow"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
EOF
# https://kind.sigs.k8s.io/docs/user/ingress/#ingress-nginx
echo "\nInstalling ingress ..."
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
# create instance-clid secret
echo "\nCreating instance-clid..."
kubectl -n default create secret generic instance-clid --from-file=instance.clid=./instance.clid
echo "\nInstalling Nuxeo Helm chart..."
cat <<EOF | helm install --repo https://chartmuseum.platform.dev.nuxeo.com my-nuxeo nuxeo --atomic --timeout 15m -f -
nuxeo:
enabled: true
image:
tag: 11.x
pullPolicy: IfNotPresent
packages: nuxeo-web-ui
customParams: |-
org.nuxeo.connect.url=https://nos-preprod-connect.nuxeocloud.com/nuxeo/site/
customEnvs:
- name: NUXEO_CLID
valueFrom:
secretKeyRef:
name: instance-clid
key: instance.clid
ingress:
enabled: true
elasticsearch:
deploy: true
mongodb:
deploy: true
EOF
echo "\nDone!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment