Skip to content

Instantly share code, notes, and snippets.

@anchoo2kewl
Created October 5, 2016 03:49
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 anchoo2kewl/b3c5993285f7bc2a66f4e101208f33a3 to your computer and use it in GitHub Desktop.
Save anchoo2kewl/b3c5993285f7bc2a66f4e101208f33a3 to your computer and use it in GitHub Desktop.
setting up openstack on my bluemix machine
###################################################
# This is for running devstack on Ubuntu 16.04
# as of September 9, 2016, (near the end of Newton)
###################################################
# This was tested using VMWare Fusion 8.1.1 on OSX, an alternative is VirtualBox
# Download VirtualBox latest 4.xx https://www.virtualbox.org/wiki/Download_Old_Builds_4_3
# Download Ubuntu 16.04 http://releases.ubuntu.com/16.04/ubuntu-16.04-desktop-amd64.iso
# Create a Ubuntu VM, 64 bit. Give it 4-6 GB RAM, 25-40 GB HD, 2-3 processors
# Boot up the VM, install ubuntu, use the default settings.
## get the latest update sources
sudo apt-get update
## ONLY IF USING VIRTUAL BOX!
# Needed for making ubuntu full screen (i.e.; install guest additions)
# sudo apt-get install dkms
# sudo apt-get install -y build-essential linux-headers-server
# Then mount guest additions ISO via virtualbox window and run the installation script
## update one last time
sudo apt-get update -y
sudo apt-get upgrade -y
## pull down devstack and some other requirements
sudo apt-get install git curl vim git-review
# Devstack or the OS should install/come with apache2, python-pip python2.7-dev python3.4
cd ~
git clone https://github.com/openstack-dev/devstack
cd devstack
# create a file called local.conf
vi local.conf
# Add the following to the file (don't include the ==='s)
=====================================
[[local|localrc]]
RECLONE=yes
OFFLINE=no
DATABASE_PASSWORD=openstack
ADMIN_PASSWORD=openstack
SERVICE_PASSWORD=openstack
RABBIT_PASSWORD=openstack
# keystone
ENABLED_SERVICES=rabbit,mysql,key
# horizon
ENABLED_SERVICES+=,horizon
# nova
ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch,n-obj,n-novnvc
# glance
ENABLED_SERVICES+=,g-api,g-reg
# cinder
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak
# uncomment the line below if you want nova-net, you probably don't
#ENABLED_SERVICES+=,n-net
# neutron
ENABLED_SERVICES+=,q-agt,q-dhcp,q-l3,q-meta,q-metering,q-svc,quantum
# swift
#ENABLED_SERVICES+=,s-account,s-container,s-object,s-proxy
#SWIFT_REPLICAS=1
#SWIFT_HASH=011688b44136573e209e
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs
=====================================
# Now run devstack!
./stack.sh
# Source your generated RC file:
. openrc admin admin
# Now run some commands
openstack user list
# Make sure that you can launch horizon
# launch firefox and go to: localhost and authenticate with admin/openstack
# Check your processes by checking `screen`:
screen -r # launches the screen
# bring up log switcher: ctrl + a, then double quote
# exit screen: ctrl + a, then 'd' for disconnect
###################################################
# You're done!
# Everything below here is for development purposes
###################################################
# Install a few things for testing...
sudo apt-get install python2.7-dev python3-dev -y
sudo pip install tox
# The rest is for setting up a development environment
## setup Git
git config --global user.name "Steve Martinelli"
git config --global user.email "s.martinelli@gmail.com"
## setup Gerrit
git config --global --add gitreview.username "stevemar"
## setup git-review & gerrit
ssh-keygen
# Confirm the default path .ssh/id_rsa
# Enter a passphrase, leave it blank.
cat ~/.ssh/id_rsa.pub
# the key will be printed out
# copy and paste that key into gerrit
# in gerrit - go to top right, settings > keys > add new key
## install liclipse
# instructions here: http://www.indjango.com/installing-liclipse-on-ubuntu/
wget https://googledrive.com/host/0BwwQN8QrgsRpLVlDeHRNemw3S1E/LiClipse%203.0.6/liclipse_3.0.6_linux.gtk.x86_64.tar.gz
tar xvzf liclipse_3.0.6_linux.gtk.x86_64.tar.gz
sudo mv liclipse /opt
sudo ln -s /opt/liclipse/LiClipse /usr/bin/liclipse
# Launch liclipse
liclipse &
# set workspace to /opt/stack
# use the light theme
# new project > pydev project > python-openstackclient
# set python interpreter, select auto-config
# pin liclipse to the taskbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment