Last active
February 26, 2016 15:39
-
-
Save agentultra/9854e90798269259dc83 to your computer and use it in GitHub Desktop.
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
git clone https://git.openstack.org/openstack-dev/devstack | |
cd devstack | |
cat << EOF > local.conf | |
[[local|localrc]] | |
DEST=/opt/stack | |
DATA_DIR=/opt/stack/data | |
SCREEN_LOGDIR=/opt/stack/data/logs/ | |
LOGFILE=/opt/stack/data/logs/devstacklog.txt | |
VERBOSE=True | |
USE_SCREEN=True | |
LOG_COLOR=True | |
RABBIT_PASSWORD=secret | |
MYSQL_PASSWORD=secret | |
SERVICE_TOKEN=secret | |
SERVICE_PASSWORD=secret | |
ADMIN_PASSWORD=secret | |
SERVICE_HOST=127.0.0.1 | |
FORCE_CONFIG_DRIVE=True | |
VIRT_DRIVER=libvirt | |
# To use nested KVM, un-comment the below line | |
LIBVIRT_TYPE=kvm | |
IMAGE_URLS="http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img" | |
# If you have `dnf` package manager, use it to improve speedups in DevStack build/tear down | |
# export YUM=dnf | |
enable_plugin astara https://github.com/openstack/astara | |
enable_service g-api g-reg key n-api n-cpu n-sch n-cond mysql rabbit dstat q-svc q-agt astara | |
disable_service n-net | |
EOF | |
./stack.sh | |
. openrc demo | |
openstack security group rule create --proto icmp --src-ip 0.0.0.0/0 default | |
openstack security group rule create --proto tcp --dst-port 22 default | |
PRIV_NET=$(openstack network list | grep thenet | awk '{print $2}') | |
openstack keypair create oskey0 > oskey1.priv | |
chmod 600 oskey1.priv | |
openstack server create \ | |
--image cirros-0.3.3-x86_64-disk \ | |
--nic net-id=$PRIV_NET --flavor m1.tiny \ | |
--key-name oskey0 \ | |
--security-group default \ | |
cirrvm1 | |
echo "Waiting for instance to boot..." | |
sleep 10 | |
INSTANCE_ID=$(openstack server list | grep -i active | awk '{print $2}') | |
openstack ip floating create public | |
FLOATING_IP=$(openstack ip floating list | grep public | awk '{print $6}') | |
sleep 5 # give a little time for neutron to bring it to active | |
echo "Attempting to associate $FLOATING_IP to $INSTANCE_ID" | |
openstack ip floating add $FLOATING_IP $INSTANCE_ID | |
nova list | |
echo "done." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment