Skip to content

Instantly share code, notes, and snippets.

@filler
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filler/2134273851ca4fc79aae to your computer and use it in GitHub Desktop.
Save filler/2134273851ca4fc79aae to your computer and use it in GitHub Desktop.
export RACKSPACE_USERNAME=LOLUSER
export RACKSPACE_PASSWORD=LOLPASS
export RACKSPACE_API_KEY=LOLKEY
export CHEF_SERVER_URL=chef.dsgn8.net
export OPSCODE_USER=rand5944
export PRODUCT=dsgn8
export RACKSPACE_SSHKEY_PUB='/Users/silkey/.ssh/id_rsa.rax.pub'
export RACKSPACE_IMAGE=a1558fdc-3182-4a0f-b48a-aa900a5826c3
export RACKSPACE_FLAVOR=performance1-4
export RACKSPACE_REGION=iad
export RACKSPACE_NETWORK='vlan6_172_16_6'
export RACKSPACE_NETWORK_CIDR='172.16.6.0/24'
export RAX_USERNAME=$RACKSPACE_USERNAME
export RAX_API_KEY=$RACKSPACE_API_KEY
export RAX_REGION=`echo $RACKSPACE_REGION | tr '[:lower:]' '[:upper:]'`
export RACKSPACE_ZONE=cicd.dsgn8.net
export RACKSPACE_EMAIL=dnsaas@rackspace.com
export RACKSPACE_SERVER_COUNT=1
export DESIGNATE_ENDPOINT=stage
export DESIGNATE_REF=abcd123
export DESIGNATE_DATE=`date +%Y%m%d`
export DESIGNATE_MARKER=${DESIGNATE_DATE}-${DESIGNATE_REF}
export BOOTSTRAP_VERSION=11.16.4
export CHEF_ENVIRONMENT=prod
export CHEF_RUNLIST="role[api]"
export RAX_CREDS_FILE=./.raxcreds
PREP=source $(HOME)/.openrc/dnsaasci && \
export ANSIBLE_HOST_HEY_CHECKING=false && \
ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null \
-o ControlMaster=auto \
-o ControlPersist=60s \
-o StrictHostKeyChecking=no \
-o PubkeyAuthentication=yes'
PLAY=ansible-playbook deploy.yml
help:
@echo "help - show help information"
@echo "ansible - install ansible in virtualenv"
@echo "create - create the instances"
@echo "doit - create and bootstrap the instances"
@echo "roll - blue-green roll the instances"
@echo "delete - remove the instances"
@echo "tag - run a particular tag"
@echo " eg make tag TAG=lb"
@echo ""
@echo "newrole - create new role skeleton"
@echo " eg make newrole ROLE=nginx"
ansible:
test -d venv || virtualenv venv --no-site-packages
./venv/bin/pip install -r ./requirements.txt
create:
$(PREP) && $(PLAY) --tags=create
roll:
$(PREP) && $(PLAY) --tags=roll
delete:
$(PREP) && $(PLAY) --tags=delete
doit:
$(PREP) && $(PLAY) --tags=create,bootstrap
tag:
$(PREP) && $(PLAY) --tags=$(TAG)
# http://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line
newrole:
mkdir -p roles/$(ROLE)/{defaults,files,handlers,tasks,templates}
Babel==1.3
Jinja2==2.7.3
MarkupSafe==0.23
PyYAML==3.11
ansible==1.9.0.1
argparse==1.3.0
ecdsa==0.13
httplib2==0.9.1
iso8601==0.1.10
keyring==5.3
mock==1.0.1
msgpack-python==0.4.6
netaddr==0.7.14
netifaces==0.10.4
os-diskconfig-python-novaclient-ext==0.1.2
os-networksv2-python-novaclient-ext==0.25
os-virtual-interfacesv2-python-novaclient-ext==0.19
oslo.config==1.11.0
oslo.i18n==1.6.0
oslo.serialization==1.5.0
oslo.utils==1.5.0
paramiko==1.15.2
pbr==0.10.8
prettytable==0.7.2
pycrypto==2.6.1
pyrax==1.9.4
python-keystoneclient==1.4.0
python-novaclient==2.24.1
pytz==2015.2
rackspace-auth-openstack==1.3
rackspace-novaclient==1.4
rax-default-network-flags-python-novaclient-ext==0.3.1
rax-scheduled-images-python-novaclient-ext==0.3.1
requests==2.6.0
simplejson==3.6.5
six==1.9.0
stevedore==1.4.0
wsgiref==0.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment