# Interview homework
###### tags: `Training`
# Welcome to TripleO's take home assignment
You will get a server with 2 interfaces on which to perform the standalone install from the instructions below. We have validated these instructions below, you will find reference documentation at [this link](https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/standalone.html)
Please send us your ssh keys to gain access to the server - if you cannot access the server with keys already added. ssh to the server as the centos user.
This deployment will be referenced in your interview. Please leave it up and running.
If you need to restart the deployment on a new node, ping us (rlandy, weshay_ruck on #tripleo) and we will give you a new node to work on.
## Prep work
* please execute the following ..
* update your instance, and install prereqs
```
sudo dnf update -y
sudo dnf install -y python3
sudo setenforce 0
```
* Ensure a fully qualified hostname has been configured
```
sudo hostnamectl set-hostname standalone.localdomain
sudo hostnamectl set-hostname standalone.localdomain --transient
```
* install tripleos repo setup tool
* check for the exact rpm in https://trunk.rdoproject.org/centos8-victoria/component/tripleo/current
```
sudo dnf install -y https://trunk.rdoproject.org/centos8-victoria/component/tripleo/current/python3-tripleo-repos-0.1.1-0.20210118183911.2cfaa48.el8.noarch.rpm
sudo -E tripleo-repos -b victoria current
sudo dnf install -y python3-tripleoclient
```
* network manager needs to be disabled.
```
sudo rm -rf /etc/sysconfig/network-scripts/ifcfg-ens3
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
```
----
## start the install process
* export required parameters
```
export IP=${IP_ON_eth0}
export VIP=192.168.101.2
export NETMASK=24
export INTERFACE=eth1
```
* create a container prepare configuration
```
openstack tripleo container image prepare default \
--output-env-file $HOME/containers-prepare-parameters.yaml
```
* create the parameters for the standalone deployment of TripleO's Openstack
```
cat <<EOF > $HOME/standalone_parameters.yaml
parameter_defaults:
CloudName: $IP
ControlPlaneStaticRoutes: []
Debug: true
DeploymentUser: $USER
DnsServers:
- 1.1.1.1
- 8.8.8.8
DockerInsecureRegistryAddress:
- $IP:8787
NeutronPublicInterface: $INTERFACE
# domain name used by the host
CloudDomain: localdomain
NeutronDnsDomain: localdomain
# re-use ctlplane bridge for public net, defined in the standalone
# net config (do not change unless you know what you're doing)
NeutronBridgeMappings: datacentre:br-ctlplane
NeutronPhysicalBridge: br-ctlplane
# enable to force metadata for public net
#NeutronEnableForceMetadata: true
StandaloneEnableRoutedNetworks: false
StandaloneHomeDir: $HOME
InterfaceLocalMtu: 1500
# Needed if running in a VM, not needed if on baremetal
NovaComputeLibvirtType: qemu
SELinuxMode: permissive
EOF
```
* Now execute the deployment
```
sudo openstack tripleo deploy \
--templates \
--local-ip=$IP/$NETMASK \
--control-virtual-ip $VIP \
-e /usr/share/openstack-tripleo-heat-templates/environments/standalone/standalone-tripleo.yaml \
-r /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml \
-e $HOME/containers-prepare-parameters.yaml \
-e $HOME/standalone_parameters.yaml \
--output-dir $HOME \
--standalone
```