Skip to content

Instantly share code, notes, and snippets.

@NileshChandekar
Forked from mail2nadeem92/READ_ME.rst
Created April 12, 2018 10:15
Show Gist options
  • Save NileshChandekar/51f4b8aef39f331c5dd086fdddaea1a6 to your computer and use it in GitHub Desktop.
Save NileshChandekar/51f4b8aef39f331c5dd086fdddaea1a6 to your computer and use it in GitHub Desktop.
Queens Installation steps
#### Configuration required for Non-HA environment
export CONFIG=~/1control-2comp.yml
cat > $CONFIG << EOF
undercloud_memory: 10240
control_memory: 10000
compute_memory: 4048
# Define a controller node, a compute node, and a ceph node.
overcloud_nodes:
- name: control_0
flavor: control
virtualbmc_port: 6230
- name: compute_0
flavor: compute
virtualbmc_port: 6231
- name: compute_1
flavor: compute
virtualbmc_port: 6232
node_count: 3
containerized_overcloud: true
delete_docker_cache: true
run_tempest: false
extra_args: >-
--libvirt-type qemu
--ntp-server pool.ntp.org
--compute-scale 2
network_isolation: true
network_isolation_type: 'single-nic-vlans'
EOF
##### Deployment Command
export VIRTHOST=127.0.0.2
cat > ~/deploy-all.sh << EOF
nohup bash ~/tripleo-quickstart/quickstart.sh --clean \
--release queens \
--teardown all \
--tags all \
-e @$CONFIG \
$VIRTHOST &
EOF
#####Execute the Deployment
sh ~/deploy-all.sh
tailf nohup.out
#### Configuration required for Docker HA environment
export CONFIG=~/md-ha.yml
cat > $CONFIG << EOF
undercloud_memory: 10240
control_memory: 8096
compute_memory: 6086
overcloud_nodes:
- name: control_0
flavor: control
virtualbmc_port: 6230
- name: control_1
flavor: control
virtualbmc_port: 6231
- name: control_2
flavor: control
virtualbmc_port: 6232
- name: compute_0
flavor: compute
virtualbmc_port: 6233
- name: compute_1
flavor: compute
virtualbmc_port: 6234
node_count: 5
containerized_overcloud: true
delete_docker_cache: true
enable_pacemaker: true
run_tempest: false
extra_args: >-
--libvirt-type qemu
--ntp-server pool.ntp.org
--control-scale 3
--compute-scale 2
EOF
##### Deployment Command
export VIRTHOST=127.0.0.2
cat > ~/deploy-ha.sh << EOF
nohup bash ~/tripleo-quickstart/quickstart.sh --clean \
--release queens \
--teardown all \
--tags all \
-e @$CONFIG \
$VIRTHOST &
EOF
#####Execute the Deployment
sh ~/deploy-ha.sh
tailf nohup.out
ssh-keygen -t rsa #generate ssh-key for the user
export VIRTHOST=127.0.0.2
ssh-copy-id root@$VIRTHOST
ssh root@$VIRTHOST uname -a #check passwordless login enable
sudo yum -y install git
sudo yum groupinstall "Virtualization Host" -y
sudo yum install git lvm2 lvm2-devel -y
cd ~
git clone https://github.com/openstack/tripleo-quickstart
chmod u+x ~/tripleo-quickstart/quickstart.sh
bash ~/tripleo-quickstart/quickstart.sh --install-deps
sudo setenforce 0
source overcloudrc
curl -O http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
openstack image create --disk-format qcow2 --container-format bare --public --file ./cirros-0.3.5-x86_64-disk.img cirros
openstack flavor create --public m1.extra_tiny --id auto --ram 128 --disk 0 --vcpus 1 --rxtx-factor 1
openstack security group create secgroup
openstack security group rule create secgroup --protocol tcp --dst-port 22:22 --remote-ip 0.0.0.0/0
openstack security group rule create --protocol icmp secgroup
neutron net-create public --router:external --provider:network_type flat --provider:physical_network datacentre
neutron subnet-create --name public --enable_dhcp=False --allocation-pool=start=192.168.24.210,end=192.168.24.225 --gateway=192.168.24.1 public 192.168.24.128/25
openstack network create net1
openstack subnet create subnet1 --network net1 --subnet-range 192.0.2.0/24
neutron router-create router1
neutron router-gateway-set router1 public
neutron router-interface-add router1 subnet1
neutron floatingip-create public
netid=$(openstack network show net1 -f value -c id)
floatip=$(openstack floating ip list -f value -c "Floating IP Address"|head -1)
test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
nova keypair-add --pub-key ~/.ssh/id_rsa.pub testkey
nova boot --nic net-id=$netid --image cirros --security-groups secgroup --key-name testkey --flavor m1.extra_tiny testvm
sleep 20
openstack server add floating ip testvm $floatip
openstack server list
nova console-log testvm
ping -c 5 $floatip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment