This is a project to update and modernize the infrastructure that keeps the Amahi web sites and services running.
=Goals=
We have multiple goals:
* run some of Operate internal build machines in a reliable, efficient way, so that we have consistent and updated builds/releases* have consistent Consistent and recent backups making things recoverable* run Execute some testing of Amahi apps more easily and efficiently* test Test new features in an isolated manner =Known Issues=* Cannot use multiple SSH keys via Dashboard ([https://bugs.launchpad.net/nova/+bug/1499751 OpenStack Bug #1499751])
The following guidance is based on the latest release of OpenStack (Yoga):
<ul>
<li> Download [https://www.centos.org/download/ CentOS 8 Stream] minmal image and install following [https://linuxhint.com/install_centos8_netboot_iso/ Installing CentOS 8 using NetBoot ISO Image] tutorial (use LVM, but remove ''/home'' partition and redistribute space to ''/''). </li>
<li> [https://linuxconfig.org/rhel-8-configure-static-ip-address Set Static IP Address] and [https://techjourney.net/how-to-set-change-hostname-fqdn-fully-qualified-domain-name-in-rhel-centos-7/ configure Fully Qualified Domain Name], then reboot</li>
<li> Follow step 0 - 3 of the [https://www.rdoproject.org/install/packstack/ RDO Packstack Quickstart] for the OpenStack installation (ensure step 0 prerequisites are completed first).</li>
<li> At step 4, follow the [https://www.rdoproject.org/networking/neutron-with-existing-external-network/ Neutron with existing network guidance]:</li>
<ul>
<li> Use command: <code>packstack --allinone --provision-demo=n --cinder-volumes-size=100G --keystone-admin-passwd={set password} --os-neutron-ml2-mechanism-drivers=openvswitch --os-neutron-ml2-tenant-network-types=vxlan --os-neutron-ml2-type-drivers=vxlan,flat,vlan --os-neutron-l2-agent=openvswitch --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth0 --nova-libvirt-virt-type=kvm</code> (replace {set password} and ''eth0'' with appropriate values)</li>
<li> Skip down to ''Now, create the external network with Neutron.'' and follow guidance.</li>
<li> Next move to ''Then create a router and set its gateway using the external network...'' and follow remaining guidance.</li>
</ul>
<li> Set up the floating IP addresses to the external network.</li>
<li> Create flavors named ''amahi.small'' of 10GB and ''amahi.medium'' of 15GB.
<li> Add the following rules to ''default'' Security Group (Ingress, IPv4, Remote IP 0.0.0.0):
<li> Add users and private keys for SSH login</li>
<li> Disable SSH password and root login</li>
<li> Follow step 0 - 3 of the [[media:Packstack quickstart.pdf|RDO Packstack Quickstart]] for the OpenStack installation (ensure step 0 prerequisites are completed first).Add users to web UI access</li><li> At the <code>packstack --allinone</code> step, follow the [[media:Neutron with existing external network.pdf|Neutron with existing network guidance]] instead (omit <code>–os-neutron-ovs-bridge-interfaces=br-ex:eth0</code> argument). Networks can also be setup with the web UI (preferred).Ensure OS updates applied and reboot</li><li> Refer to [[media:Floating ip range.pdf|Create a single instance with floating IP range]] for setting up the floating IP addresses to the external network. This can also now be done with the web UI (preferred).</li><li> Create flavor named ''amahi.small'' of 10GBVerify all is working as expected.<li> Extend cinder-volumes past 20GB:</li></ul> <lib> Followed the [[mediaNOTE:Openstack_increase_volume_capacity.pdf|OpenStack increase volume capacity]] and [[media:Maintaining_Loopback_devices_after_reboot.pdf|Maintaining loopback devices after reboot]] tutorials (i.e. highlighted text)</lib><li> Results in 50Gb additional space A terminal script has been developed to automate the installation steps above for volumes.</li><li> Total volume space available OpenStack after CentOS is now 70GBinstalled.</li></ul></ul>
This will outline how to build OpenStack images using [https://www.proxmox.com/en/ Proxmox VE](alternate method in development).
* Log into Proxmox VE web UI
* Create a VM or clone an existing one(<code><i>type</i>=qemu64</code>)
** If creating a VM, install the OS
** If using a clone, start the VM
* Open a console window for the VM
** Log in and as <code>root </code> do the following
*** <code>dd if=/dev/zero of=/mytempfile bs=1M</code> (zero out any unused space)
*** <code>rm -f /mytempfile</code>
** Shutdown VM
** Log into Proxmox VE via SSH and execute the following from command line
*** Navigate to <code>/vardev/lib/vz/images/###pve</code> (number of VM)*** <code>mv original_image.qcow2 original_image.qcow2_backup</code> (rename original image)*** <code>qemu-img convert -O qcow2 original_image.qcow2_backup original_imagenew_image.qcow2</code>*** Copy new <code>new_image.qcow2</code> image to a safe location for uploading into OpenStack*** Remove <code>.backup</code> file
*** Delete the VM from Proxmox VE web UI
* Use WINScp WinSCP or similar program to copy the <code>new_image.qcow2</code> image to client machine
* Upload into OpenStack via the web UI
'''REFReference:''' [httphttps://wwwgazelle.jamescoyleihe.net/how-tobook/323-reclaim-disk-space-from-a-sparse-image-file-qcow2-vmdk Reclaim disk space from .qcow2 or .vmdk imageexport/html/917 Transfer Proxmox VM]
=Create Instance=
This is a nice straightforward tutorial on [https://communitywww.hpcloudtecmint.com/article/creatingcreate-deploy-and-launch-virtual-yourmachines-firstin-openstack/ how to deploy and launch an instance(VM)]. Also refer to [https://docs.openstack.org/mitaka/user-0 Creating an guide/cli_nova_launch_instance_using_ISO_image.html launch instancefrom ISO]for an alternate method.
=Backup=
* '''Last Backup completed:'''** Instances - ''31 Aug 201704 Jul 2021''** Volumes - '' 4 Aug 201704 Jul 2021'' '''NOTES:'''
* Back up scripts have been created to synchronize instances, volumes, and snapshots to a secondary drive on demand.
* Minimal of monthly back ups be done in case of catastrophic failure.
=Tips=
==Command Line==
[https://docs.openstack.org/python-openstackclient/ussuri/ OpenStack Command Line Guide]
==Network Issues==
If the DNS server is changed or networking appears inoperable, check the following to ensure the DNS is correct:
==Miscellaneous=Known Issues=Refer to Cannot use multiple SSH keys via Dashboard ([https://bugs.amahilaunchpad.orgnet/nova/issues+bug/2050 Amahi 1499751 OpenStack Bug #20501499751] for some OpenStack Command-Line syntax.)----<br>