Skip to content

yhuang/sandboxes

Repository files navigation

sandboxes

Required Software

Add the personal private key and Vagrant's private key to OS X Keychain

  1. Download Vagrant's public SSH key and private SSH key.

  2. Put the SSH keys under $HOME/.ssh and set the appropriate permissions on Vagrant's private key.

macOS$ chmod 400 $HOME/.ssh/vagrant
  1. Starting with OS X Leopard, ssh-agent is more tightly integrated with Keychain. Securely storing the passphrases tied to all of a user's SSH keys in Keychain is now possible. Once added, ssh-agent will automatically load them on boot.
macOS$ ssh-add -K $HOME/.ssh/<your_private_key>
macOS$ ssh-add -K $HOME/.ssh/vagrant

Create the devops Vagrant Machine

  1. Clone the sandboxes repo.
macOS$ git clone git@github.com:yhuang/sandboxes.git
macOS$ cd sandboxes
  1. Download CentOS-7-x86_64-DVD-1611.iso from a trusted source. Create the iso directory under the sandboxes top-level directory, and put the ISO file under the iso directory.

  2. Build the devops Vagrant box.

macOS$ packer build packer-templates/devops.json
  1. Add the devops Vagrant box.
macOS$ vagrant box add builds/devops.vmware.box --name devops
  1. Launch the devops Vagrant box.
macOS$ cd vagrantfiles/devops; vagrant up; cd ../..

Log onto the devops Vagrant Machine

Once up, the devops Vagrant machine may be accessed via either vagrant ssh

macOS$ cd vagrantfiles/devops; vagrant ssh

Set up the devops Vagrant Machine

These steps assume the following about the host Mac OS X machine:

  1. The ssh keys to remote machines are stored under $HOME/.pem/ on Mac OS X;
vagrant@devops% ln -s /host-data/.pem/ $HOME/.pem
  1. The public ssh key and private ssh key for the user on Mac OS X are $HOME/.ssh/id_rsa.pub and $HOME/.ssh/id_rsa respectively;
vagrant@devops% ln -s /host-data/.ssh/id_rsa.pub $HOME/.ssh/id_rsa.pub
vagrant@devops% ln -s /host-data/.ssh/id_rsa $HOME/.ssh/id_rsa
vagrant@devops% chmod 644 $HOME/.ssh/id_rsa.pub
vagrant@devops% chmod 600 $HOME/.ssh/id_rsa
  1. The service account tokens are exported as environmental variables in $HOME/.credentials; and
vagrant@devops% ln -s /host-data/.credentials .credentials
vagrant@devops% source $HOME/.bash_profile
  1. The project directories are under $HOME/workspace/.
vagrant@devops% ln -s /host-data/workspace/ $HOME/workspace

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published