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
FROM mesosphere/aws-cli as PKG | |
RUN apk --no-cache add openssl \ | |
&& wget -q -O kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl \ | |
&& wget -q -O gomplate https://github.com/hairyhenderson/gomplate/releases/download/v2.4.0/gomplate_linux-amd64-slim \ | |
&& chmod +x kubectl gomplate \ | |
&& mv kubectl gomplate /usr/local/bin | |
ENTRYPOINT ["/bin/sh","-c"] | |
CMD [""] |
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
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: aws-registry-proxy | |
labels: | |
app: aws-registry-proxy | |
buildRef: latest | |
spec: | |
replicas: 2 |
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
# Updates aws registry credentials | |
# https://medium.com/@xynova/keeping-aws-registry-pull-credentials-fresh-in-kubernetes-2d123f581ca6 | |
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: aws-registry-credential-cron | |
spec: | |
successfulJobsHistoryLimit: 2 | |
failedJobsHistoryLimit: 2 | |
schedule: "1 */8 * * *" |
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
# Creates aws registry credentials for the first time | |
# https://medium.com/@xynova/keeping-aws-registry-pull-credentials-fresh-in-kubernetes-2d123f581ca6 | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: aws-registry-credential-job | |
spec: | |
backoffLimit: 4 | |
template: | |
spec: |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: aws-registry-proxy-tpl | |
data: | |
registry.conf: |- | |
server { | |
listen 8080; | |
# http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size |
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
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: aws-registry-credential-cron | |
spec: | |
schedule: "* */8 * * *" | |
successfulJobsHistoryLimit: 2 | |
failedJobsHistoryLimit: 2 | |
jobTemplate: | |
spec: |
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 is ssh server systemwide configuration file. | |
# required by Azure AppServices | |
# | |
Port 2222 | |
Ciphers aes128-cbc,3des-cbc,aes256-cbc | |
MACs hmac-sha1,hmac-sha1-96 | |
PermitRootLogin yes | |
PasswordAuthentication yes | |
ListenAddress 0.0.0.0 |
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
#!/bin/sh | |
set -ebm | |
setup_ssh() { | |
echo "Create App Services root password" | |
echo "root:Docker!" | chpasswd | |
echo "Create ssh host keys" | |
ssh-keygen -A |
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
# BUILD STAGE | |
# | |
FROM golang:1.8.3-alpine3.6 AS confd-build-stage | |
WORKDIR /go/src/github.com/kei-sato | |
RUN apk --update add git bash | |
RUN git clone --depth 1 https://github.com/kei-sato/http-echo.git \ | |
&& cd http-echo \ | |
&& go build -o bin/http-echo . \ | |
&& chmod +x bin/http-echo |
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
docker run --rm -ti --name rediscli \ | |
--net container:nginx \ | |
redis:alpine \ | |
redis-cli -h localhost -p 6379 -a THE-XXXX-PASSWORD set /myapp/suggestions/drink coffee |