Update
This commit is contained in:
parent
4d2cc36338
commit
e8284a695a
3 changed files with 9 additions and 4 deletions
|
@ -31,15 +31,13 @@ InstallRegistry () {
|
||||||
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
|
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
|
||||||
helm install registry stable/docker-registry \
|
helm install registry stable/docker-registry \
|
||||||
--set ingress.enabled=true \
|
--set ingress.enabled=true \
|
||||||
--set ingress.hosts[0]="registry.k8s-demo.vm"
|
--set ingress.hosts[0]="registry.k8s-demo.ix.gs"
|
||||||
echo '100.100.100.15 registry.k8s-demo.vm' >> /etc/hosts
|
|
||||||
}
|
}
|
||||||
InstallPGSQL () {
|
InstallPGSQL () {
|
||||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||||
helm install db bitnami/postgresql \
|
helm install db bitnami/postgresql \
|
||||||
--set persistence.storageClass=hostpath \
|
--set persistence.storageClass=hostpath \
|
||||||
--set persistence.size=1Gi
|
--set persistence.size=1Gi
|
||||||
POSTGRES_PASSWORD=$(kubectl get secret db-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
|
|
||||||
}
|
}
|
||||||
InstallIngress () {
|
InstallIngress () {
|
||||||
# Allow scheduling on our master node
|
# Allow scheduling on our master node
|
||||||
|
@ -52,6 +50,10 @@ InstallIngress () {
|
||||||
}
|
}
|
||||||
InstallApp () {
|
InstallApp () {
|
||||||
cd ${groot}
|
cd ${groot}
|
||||||
|
export WERF_INSECURE_REGISTRY=true
|
||||||
|
export WERF_IMAGES_REPO='http://registry.k8s-demo.vm/gtd'
|
||||||
|
werf build --stages-storage :local && \
|
||||||
|
werf publish --stages-storage :local --tag-git-branch master && \
|
||||||
werf deploy --env production --set 'DBPwd=$(kubectl get secret db-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)'
|
werf deploy --env production --set 'DBPwd=$(kubectl get secret db-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ d-i preseed/late_command string in-target /bin/sh -c " \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
docker-ce docker-ce-cli containerd.io helm ; \
|
docker-ce docker-ce-cli containerd.io helm ; \
|
||||||
apt-get clean ; \
|
apt-get clean ; \
|
||||||
curl -L https://dl.bintray.com/flant/werf/v1.1.8+fix17/werf-linux-amd64-v1.1.8+fix17 -o /usr/bin/werf ; \
|
curl -L https://dl.bintray.com/flant/werf/v1.1.21+fix19/werf-linux-amd64-v1.1.21+fix19 -o /usr/bin/werf ; \
|
||||||
chmod +x /usr/bin/werf ; \
|
chmod +x /usr/bin/werf ; \
|
||||||
git clone https://git.ix.gs/public/coins-demo.git /opt/coins-demo ; \
|
git clone https://git.ix.gs/public/coins-demo.git /opt/coins-demo ; \
|
||||||
cp /opt/coins-demo/contrib/mfg.service /etc/systemd/system/ ; \
|
cp /opt/coins-demo/contrib/mfg.service /etc/systemd/system/ ; \
|
||||||
|
|
3
werf.yml
3
werf.yml
|
@ -1,2 +1,5 @@
|
||||||
project: coins-demo
|
project: coins-demo
|
||||||
configVersion: 1
|
configVersion: 1
|
||||||
|
---
|
||||||
|
image: ~
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
Loading…
Reference in a new issue