This is a project to update and modernize the infrastructure that keeps the Amahi web sites and services running.
The idea is to provide easier and more sustainable management of the infrastructure to leave more time for the team to devote to moving the project forward.
'''NoteNOTE:''' this project is not about running Amahi platform software on virtual servers, etc. For that there is a separate page on [[Virtualization]].
===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...
=Setup=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=Softwareopenvswitch --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>* CentOS 7 x86_64 <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):<ul><li> ICMP / Any</li><li> TCP / 22</li><li> TCP / 80</li><li> TCP / 3000</li><li> TCP / 443 (Minimal<i>Optional</i>)</li></ul><li> Add users and private keys for SSH login</li><li> Disable SSH password and root login</li><li> Add users to web UI access</li><li> Ensure OS updates applied and reboot</li><li> Create a single instance with floating IP</li>* OpenStack Juno Release<li> Verify all is working as expected.</li></ul>
===Setup===
* Download and install [http://isoredirect.centos.org/centos/7/isos/x86_64/ CentOS 7 x86_64 minimal] image
* Configure FQDN (<code>/etc/hosts</code> and <code>/etc/hostname</code>)
* Manually configure networking (set static IP address)
* Install OpenStack following [https://openstack.redhat.com/Quickstart RDO Quickstart] instructions (run <code>packstack --allinone</code> as root)
<b>NOTE:</b> A terminal script has been developed to automate the installation steps above for OpenStack after CentOS is installed. =Naming Convention==Notes===The following is recommended for standardization:* the floating IPs situation may not work on nonInstances: '''os-externally routed IPsfunction''' (i.e. this may be why they set up a 179''f24-bot'', ''f24-repo'', ''f24-dev'', etc)* Images: '''os-type''' (i. "public" network by detafult in the RDO setupe. ''f24-cd'', ''f24-dvd'', etc)* Snapshot: '''os-function-ss#''' (i deleted that network .e. ''f24-repo-ss1'', ''f24-bot-ss2'', etc)* the external network needs Volumes: '''instance-vol''' (i.e. ''f24-repo-vol'', ''mirrormgr-vol'', ''dlmaster-vol'', etc) =Build Images=This will outline how to be "flagged" as externalbuild OpenStack images using [https://www.proxmox.com/en/ Proxmox VE] (alternate method in development). this cannot be done with the * Log into Proxmox VE web UI* Create a VM or clone an existing one (<code><i>type</i>=qemu64</code>)** If creating a VM, but i am told install the juno release has OS** If using a feature where attribute editing. so that clone, start the external attribute can be set to Yes. once that is done, MAYBE VM* Open a console window for the system allows floating IPs VM** Log in that network even 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 IP range is not externally routablefollowing from command line* resizing an image does not seem ** Navigate to work reliably<code>/dev/pve</code>*** <code>qemu-img convert -O qcow2 original_image new_image. i am not sure, but i think resizing is "queued" so that it's done on the next rebootqcow2</code>*** Copy <code>new_image. however, i tried qcow2</code> to resize the centos box to m1.tiny and it was queued but it did not work. this is not a deal breaker, but still.safe location for uploading into OpenStack* ** Delete the next thing is VM from Proxmox VE web UI* Use WinSCP or similar program to be able copy the <code>new_image.qcow2</code> to bridge client machine* Upload into OpenStack via the connections reliablyweb UI '''Reference:''' [https://gazelle. there ihe.net/book/export/html/917 Transfer Proxmox VM] =Create Instance=This is link at the end of the RDO quickstart page a nice straightforward tutorial on "[https://www.tecmint.com/create-deploy-and-launch-virtual-machines-in-openstack/ how to use it with your existing network" however, when i did this deploy and launch an instance (editing config files in a potentially messy wayVM)]. Also refer to [https://docs.openstack.org/mitaka/user-guide/cli_nova_launch_instance_using_ISO_image.html launch instance from ISO] for an alternate method. =Backup='''Last Backup completed:'''* Instances - ''04 Jul 2021''* Volumes - ''04 Jul 2021'' '''NOTES:'''* Back up scripts have been created to synchronize instances, it workedvolumes, but and snapshots to a reboot would not bring the network upsecondary drive on demand. this may * Minimal of monthly back ups be a centos issue, not sure, but a network restart was done in case of catastrophic failure.* See [https://github.com/Nexenture/openstack-instances-backups OpenStack Instance Backups] to automate via terminal script (some modification is needed). =Tips===Command Line==[https://docs. this openstack.org/python-openstackclient/ussuri/ OpenStack Command Line Guide]==Network Issues==If the DNS server is a must changed or networking appears inoperable, check the following to be able to funnel traffic from outside (ensure the floating ips) to DNS is correct:* ''/etc/sysconfig/network-scripts/ifcfg-br-ex''* ''/etc/resolve.conf'' Next restart neutron network services:<code>:service neutron-server restart<br />:service neutron-dhcp-agent restart<br />:service neutron-l3-agent restart<br />:service neutron-metadata-agent restart<br />:service neutron-openvswitch-agent restart</code> ==Volume Issues==When a volume becomes detached and/or shows in error, the inside VMsstate can be reset:<code>:source keystonerc_admin:cinder reset-state ''volume_id''</code>or use web UI.* basically understand what it takes Also refer to get [https://bugs.amahi.org/issues/2051 Amahi Bug #2051]. ==Instance Issues==When an instance '''Status''' reflects an image created''error'' state, reset it by:<code>:source keystonerc_admin:nova reset-state --active INSTANCE_ID</code> '''NOTE:''' Should the '''Power State''' reflect ''no state'' or blank, seasonedit can be corrected by doing the above step, and how we need to maintain these over long periods. i think then starting the main workhorse is qcow2 toolsinstance. ==Update/Reboot/Shutdown Process==Follow guidelines below to prevent corruption:* Shutdown/Disconnect** Stop all instances** Verify all instances stopped** Perform Update/Reboot/Shutdown<br>* these images Once system Started/Rebooted:** Start all needed instances** Verify all instances are like "snapshots" in some way, but operational ==Create Static IP for Instance==Setting a snapshot is frozen and cannot static IP for instances will ensure the internal IP address remains the same through it's life cycle. The floating IP address can be tweakedeasily added afterwards.* long term we want As root user, execute <code>source keystonerc_admin</code>* Use the following to make images like this for testingreserve the IP address:<code>:openstack port create --network private --fixed-ip subnet_id=private_subnet, eip_address=x.x.gx. x static-ip-1</code>* Create the instance and boot via command-line vs the web UI:<code>:openstack server create --image IMAGE_NAME --flavor amahi 7 .small --nic port-id=NETWORK_ID_FROM_ABOVE_COMMAND INSTANCE_NAME</code> :'''NOTE:''' If image that is bootable and name has spaces, enclose itin double quotes.Ref: [https://ask.openstack.org/en/question/30690/add-multiple-specific-ips-to-instance/ Add Multiple Specific IPs to Instance] ==Change Instance Flavor==As ''root''user:<code>:source keystonerc_admin</code>See [https://docs.openstack.org/newton/user-guide/cli-change-the-size-of-your-server Change the size of your server] for command line guidance. ==Fedora Cloud Base Images==See [https://alt.fedoraproject.org/cloud/ Fedora Cloud Base Images] for guidance. == Migration ===== Images ===See [https://raymii.org/s plain instal/tutorials/Openstack_Glance_Image_Download. another example is a fully up html OpenStack Glance Image Download Tutorial] for how to date amahi 7 image, etc.* so they are alive in that these transfer images are frozen in time, but from one takes a copy and can then evolve it into a new version of the imageserver to another.* i do see with two 2GB ram instances running, === Snapshots ===See [https://community.cisco.com/t5/cloud-blogs/how-to-snapshot-an-openstack-nova-instance-boot-it has very little ram left -download/ba- which means the webapp itself and p/3661228 Snapshot an OpenStack instance, boot it's components do take a substantial amount of memory, which is a painand download] for how to transfer snapshots from one instance to another. === Volumes ===See [http://blog.oddbit. com/2015/09/29/migrating-cinder-volumes-between-openstack-environments/ Migrating cinder volumes between OpenStack environments] for how to transfer volumes from one possibility is instance to run another. ==Fix Broken Web UI==Add the control part of the node in a separate VM somewhere and leave this host following line to do pure host service''/etc/httpd/conf.d/15-horizon_vhost. it may still be conf'': WSGIApplicationGroup %{GLOBAL}Then restart the case that the control VM would require a lot of web server Ref: resources, however, but we don't know how much[https://ask.openstack.org/en/question/91352/openstack-mitaka-can-not-access-dashboard/ OpenStack cannot access Dashboard] =Known Issues=Cannot use multiple SSH keys via Dashboard ([https://bugs.launchpad.net/nova/+bug/1499751 OpenStack Bug #1499751])<br />