Last active
December 28, 2015 07:29
-
-
Save pungoyal/7464366 to your computer and use it in GitHub Desktop.
notes for devops days
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
site :opscode | |
cookbook 'vim' | |
cookbook 'ntp' |
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
# add ruby to path | |
echo "export PATH=\$PATH:/opt/chef/embedded/bin" >> ~/.bashrc | |
source ~/.bashrc | |
ruby -v | |
# get dev tools | |
aptitude install build-essential -y | |
aptitude install zlib1g-dev libssl-dev openssl libreadline-dev sqlite3 libsqlite3-dev libxslt-dev libxml2-dev -y | |
# install berkshelf | |
gem install berkshelf | |
# turn off ssl for the time being | |
mkdir -p ~/.berkshelf | |
echo "{\"ssl\": {\"verify\": false}}" >> ~/.berkshelf/config.json |
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
wget "https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.8-1.ubuntu.12.04_amd64.deb" | |
dpkg -i "chef-server_11.0.8-1.ubuntu.12.04_amd64.deb" | |
sudo chef-server-ctl reconfigure |
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
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
# Add the Docker repository to your apt sources list. | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" | |
# Update your sources | |
sudo apt-get update | |
# Install, you will see another warning that the package cannot be authenticated. Confirm install. | |
sudo apt-get install -y lxc-docker |
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
# install chef client package | |
curl -L https://www.opscode.com/chef/install.sh | sudo bash | |
# get docker gateway address | |
ifconfig docker0 | grep inet | |
# USE the address from above | |
knife configure --initial | |
# check setup | |
knife client list |
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
# install and configure chef-server | |
curl -L http://tiny.cc/install-chef-server | bash | |
# install and configure docker | |
curl -L http://tiny.cc/docker-install | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/etc/chef-server/chef-server.rb
server_name = "172.17.42.1"
api_fqdn server_name
nginx['url'] = "https://#{server_name}"
nginx['server_name'] = server_name
lb['fqdn'] = server_name
bookshelf['vip'] = server_name