mdsumner / nectar

16 stars 1 forks source link

openstack DNS/https #14

Open mdsumner opened 1 year ago

mdsumner commented 1 year ago

I did this from the actual server itself, my old notes were a bit over the top because I had no idea what was happening.

I had a problem with python ... so I followed the instructions with a dummy user to create an env and do it all in there, but unsure that was necessary. On ace-eco-stats itself, which is where I first did the originals I had some python3.8 vs python3.11 issue.

You need to add port 80, and remove port 8787 :)

pip install python-openstackclient python-designateclient

I don't understand the python openstack vs. the apt one, but what works is use mdsumner2 (on gdalserver) as the dummy, then do

cd ~/nectar_openstack
source venv/bin/activate

then run the openstack recordset stuff as below, mentioned here

https://support.ehelp.edu.au/support/solutions/articles/6000075747-api

and described for python here

https://docs.python-guide.org/dev/virtualenvs/

then do (note the period at end of address)

openstack recordset create <project>.cloud.edu.au. <instance name> --type A --record <instance IP addr>

check with (note the final period)

openstack recordset list ace-eco-stats.cloud.edu.au.

note that the old example uses vm-

.rc.tasmania.nectar.org.au, but we just want ..cloud.edu.au

apt install nginx
## edit the nginx stuff
sudo /etc/init.d/nginx restart
mdsumner commented 1 year ago

and then

sudo apt install python3-certbot-nginx
 sudo certbot --nginx -d <the servername.project.cloud.edu.au> 
mdsumner commented 1 year ago

I had to edit to use 3.8 ...

cat /usr/bin/certbot
#!/usr/bin/python3.8
...