Last active
November 28, 2020 21:43
-
-
Save bobbae/7625b8a160dc6d1b54c9378f5868a423 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
| # | |
| # https://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-provider.html | |
| # | |
| sudo useradd -s /bin/bash -d /opt/stack -m stack | |
| mkdir /opt/stack/log | |
| echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack | |
| sudo su - stack | |
| git clone https://github.com/openstack-dev/devstack.git -b stable/queens devstack/ | |
| cd devstack/ | |
| sudo ifconfig | |
| # pick main interface's IP | |
| # and use it as HOST_IP below | |
| cat > local.conf <<EOF | |
| [[local|localrc]] | |
| ADMIN_PASSWORD=secret | |
| DATABASE_PASSWORD=\$ADMIN_PASSWORD | |
| RABBIT_PASSWORD=\$ADMIN_PASSWORD | |
| SERVICE_PASSWORD=\$ADMIN_PASSWORD | |
| HOST_IP=10.0.2.15 | |
| RECLONE=yes | |
| EOF | |
| FORCE=yes ./stack.sh | |
| # dash board is at http://<HOST_IP>/dashboard | |
| # login as admin/secret | |
| . openrc | |
| nova flavor-list # openstack flavor list | |
| glance image-list # openstack image list | |
| neutron net-list # depricated -- use openstack network list instead, but neutron net-list shows IP addresses | |
| openstack security group list | |
| # have to create key for nova boot | |
| # for more info: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html/Getting_Started_Guide/Creating_or_Adding_a_Keypair.html | |
| nova keypair-add mykey | |
| # same as nova boot, new syntax | |
| # use id for private net from 'openstack network list' for PRIVATE_NET_ID | |
| openstack server create --flavor m1.tiny --image cirros-0.3.5-x86_64-disk --nic net-id=PRIVATE_NET_ID --security-group default --key-name mykey private-instance | |
| nova list # should show ACTIVE Running instance | |
| openstack console url show private-instance | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment