Skip to content

Commit 861b56f

Browse files
committed
finalize the staging environment, continuous deployment flow and spark chart
1 parent d297dfb commit 861b56f

29 files changed

+816
-195
lines changed

.dockerignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.env
22
.git
3-
secret-*
3+
secret*
4+
.travis.yml
5+
continuous_deployment.sh
6+
environments

.gitignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ celerybeat-schedule
7979
# SageMath parsed files
8080
*.sage.py
8181

82-
# dotenv
83-
.env
84-
8582
# virtualenv
8683
.venv
8784
venv/
@@ -100,6 +97,6 @@ ENV/
10097
# mypy
10198
.mypy_cache/
10299

103-
.env
104-
secret-*
100+
/.env
105101
.idea
102+
secret*

.helmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.sql
2+
*.sh
3+
*.py
4+
secret-*

.travis.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
language: bash
22
sudo: required
33
env:
4-
- K8S_CONTINUOUS_DEPLOYMENT=true
4+
matrix:
5+
- DEPLOY_ENVIRONMENT=staging
56
services:
67
- docker
78
script:
8-
- ./continuous_deployment.sh
9+
- |
10+
if [ "${DEPLOY_ENVIRONMENT}" != "" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "master" ] &&\
11+
[ "${TRAVIS_COMMIT_MESSAGE}" != "" ] && ! echo "${TRAVIS_COMMIT_MESSAGE}" | grep -- --no-deploy && [ "${TRAVIS_COMMIT}" != "" ]
12+
then
13+
openssl aes-256-cbc -K $encrypted_de69cc520442_key -iv $encrypted_de69cc520442_iv -in midburn-k8s-ops.json.enc -out secret-midburn-k8s-ops.json -d
14+
IMAGE_TAG="gcr.io/uumpa123/midburn-k8s:${TRAVIS_COMMIT}"
15+
B64_UPDATE_VALUES=`echo '{"global":{"opsImage":"'${IMAGE_TAG}'"}}' | base64 -w0`
16+
./run_docker_ops.sh "${DEPLOY_ENVIRONMENT}" "
17+
cd /ops
18+
! ./helm_upgrade.sh \
19+
&& echo 'failed helm upgrade' && exit 1
20+
exit 0
21+
"
22+
fi

CONTRIBUTING.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing to the Midburn Kubernetes environment
2+
3+
The Midburn Kubernetes environment accepts contributions via GitHub pull requests.
4+
This document outlines the process to help get your contribution accepted.
5+
6+
7+
## Reporting a security vulnerability
8+
9+
Most of the time, when you find a bug, it should be reported using GitHub issues.
10+
However, if you are reporting a security vulnerability, please contact us via Slack.
11+
12+
13+
## Support Channels
14+
15+
* GitHub [issues](https://github.com/Midburn/midburn-k8s/issues)
16+
* Slack: #devops channel in the [Midburn Slack](https://slackpass.io/midburnos)

Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ RUN apk --update --no-cache add bash jq py2-pip openssl curl && pip install --up
44
RUN gcloud --quiet components install kubectl
55
RUN curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh && chmod 700 get_helm.sh && ./get_helm.sh && rm ./get_helm.sh
66
RUN apk --update --no-cache add git && pip install pyyaml
7+
RUN apk --update --no-cache add mysql-client
78

89
RUN mkdir /ops
910

1011
WORKDIR /ops
1112

12-
RUN echo "gcloud auth activate-service-account --key-file=/k8s-ops/secret.json" >> ~/.bashrc
13+
RUN echo '[ -f /k8s-ops/secret.json ] && gcloud auth activate-service-account --key-file=/k8s-ops/secret.json' >> ~/.bashrc
14+
15+
COPY . /ops
1316

1417
ENTRYPOINT ["bash"]

0 commit comments

Comments
 (0)