##On Docker##
WHY I LOVE DOCKER… AND WHY YOU’LL LOVE IT TOO
DOCKER AND THE THREE WAYS OF DEVOPS
##On Immutable Infrastructure##
#bootstrap chef client on workstation | |
unix> curl -L https://www.opscode.com/chef/install.sh | bash | |
1047 knife bootstrap chefnode -x root -P qwerty --verbose | |
1048 knife ssl check | |
1049 vi /etc/hosts | |
1050 knife ssl check | |
1051 knife ssl check | |
1052 knife ssl check |
##On Docker##
WHY I LOVE DOCKER… AND WHY YOU’LL LOVE IT TOO
DOCKER AND THE THREE WAYS OF DEVOPS
##On Immutable Infrastructure##
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUsersAllActionsForCredentials", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:*LoginProfile", | |
"iam:*AccessKey*", | |
"iam:*SigningCertificate*" |
############################################################################### | |
# Install MySQL Server 5.7 on Ubuntu 16.04 LTS | |
############################################################################### | |
# Download and Install the Latest Updates for the OS | |
apt update && apt upgrade -y | |
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root" | |
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections | |
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections |
#!/bin/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
# Last updated: 08/24/2916 | |
# | |
# Total instructions available: 18 | |
# | |
# https://docs.docker.com/engine/reference/builder/ | |
# | |
# You can use a .dockerignore file in the same context directory as | |
# your Dockerfile to ignore files in the context before sending them | |
# to the Docker daemon for building to speed up building. |
## Java | |
sudo apt-get update | |
sudo apt-get install default-jdk | |
## Scala | |
sudo apt-get remove scala-library scala | |
sudo wget http://scala-lang.org/files/archive/scala-2.12.1.deb | |
sudo dpkg -i scala-2.12.1.deb | |
sudo apt-get update | |
sudo apt-get install scala |
Install Scala 2.11.8
$ sudo apt-get remove scala-library scala
$ sudo wget www.scala-lang.org/files/archive/scala-2.11.8.deb
$ sudo dpkg -i scala-2.11.8.deb
Check Scala version
$ scala -version
#!/bin/bash | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |