Skip to content

Instantly share code, notes, and snippets.

@pungoyal
Last active December 28, 2015 07:29
Show Gist options
  • Save pungoyal/7464366 to your computer and use it in GitHub Desktop.
Save pungoyal/7464366 to your computer and use it in GitHub Desktop.
notes for devops days
site :opscode
cookbook 'vim'
cookbook 'ntp'
# 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
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
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
# 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
# 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
@timusg
Copy link

timusg commented Nov 17, 2013

/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment