(still a work-in-progress)
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 mysql | |
ADD my.cnf /etc/mysql/my.cnf | |
CMD ["mysqld", "--datadir=/var/lib/mysql", "--user=mysql"] |
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 ubuntu | |
RUN apt-get update | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
RUN echo 'deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/testing multiverse' | tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
RUN apt-get update | |
RUN apt-get install -y mongodb-org | |
RUN mkdir -p /data/db |
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/bash | |
set -eu | |
main() { | |
local args=("$@") | |
local inFile=$(pwd)/docker-compose.yml | |
local outFile=$(pwd)/$1 | |
if [[ $# -lt 2 ]]; then | |
usage |
Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.
You can define the next environment variables:
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc
This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
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
version: "3.3" | |
services: | |
telegraf: | |
image: telegraf:1.3 | |
networks: | |
- tick-net | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
configs: |
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/bash | |
## Override | |
JENKINS_HOST="" | |
JENKINS_USERNAME="" | |
JENKINS_PASSWORD="" | |
JENKINS_JOB="" | |
CRON_EXPRESSION="cron(0 8 * * ? *)" | |
## Global variables | |
AWS_REGION="us-east-1" |
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
aws lambda invoke --function-name RestartJob output |
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
func triggerJob() error { | |
url := fmt.Sprintf(`%s/job/%s/build`, os.Getenv("JENKINS_HOST"), os.Getenv("JENKINS_JOB")) | |
client := http.Client{} | |
req, err := http.NewRequest("POST", url, nil) | |
if err != nil { | |
return err | |
} | |
crumb, err := getToken() |