- created new project
- created new instance
- purchased domain name from domains.google.com
- set up static ip and set firewalls to serve https and http
- called gcloud init to create a new profile on my mac to interact with the lindsay-labbook project
- logged into the new instance
gcloud compute ssh theodorelindsay@labbook1
- installed apache2:
sudo apt-get update sudo apt-get install apache2
- checked that the static ip for the instance was serving the apache test screen
- created a coud DNS zone called lindsay-labook-zone (networking tab of the google cloud platform menu on left)
- add two record sets, and A record and a cname. The A record (theodorelindsay.com) contains the static ip and the CNAME record contains theodorelindsay.com as the canonical name.
- update the name servers for the domain back in domains.google.com:
- selected theodorelindsay.com in the my domains page and then select configure DNS tab.
- selected use custom name servers and added the name servers listed:
bash$ gcloud dns managed-zones describe lindsay-labook-zone
ok-zone
creationTime: 'time'
description: zone for personal website
dnsName: theodorelindsay.com.
id: 'someid'
kind: dns#managedZone
name: my-example-zone
nameServers:
- ns-xxx.googledomains.com.
- ns-xxx.googledomains.com.
- ns-xxx.googledomains.com.
- ns-xxx.googledomains.com
- setup a jupyter notebook system using the setup commands listed here:
- check to make sure theodorelindsay is added to the staff group
groups theodorelindsay
- if not add myself to staff so that I have access to site-packages and dist packages in /usr/local/lib/python2.7
- that didn't work but adding --user to the end as
pip install jupyter --user
worked. - no need to install fiji
- didn't install ros
- check to make sure theodorelindsay is added to the staff group
- setup jupyter server
- jupyter notebook -genrate-config
- fire up ipython and genrate a passwd
from notebook.auth import passwd passwd()
- add the password to the ~/.jupyter/jupyter_notebook_config.py file at the
c.NotebookApp.passord =
line and uncomment - below uncomment
c.NotebookApp.port = 8888
- create a new certificate using lets encrypt
sudo apt-get install letsencrypt
- Generated self signed certificate and key
- Updated c.NotebookApp.certfile and c.NotebookApp.keyfile with absolute path to certificate and key
- Updated c.NotebookApp.ip = '*'
- set c.NotebookApp.open_browser = False
- created firewall rule at google compute engine -> networking tab ->firewall rules->create
- created jupyter-notebook 0.0.0.0/0 tcp:8888
- had a problem with the jupyter notebook not finding ipython. Solved by sudo apt-get remove --purge ipython and then pip install ipython
- cloned https://github.com/psilentp/labbook.git into src.git
- from the labbook repo root directory:
- started the notebook server in the background with jupyter notebook &
- installed the pelican requirments: pip install -r requirements.txt
- updated the submodules
git submodule update --init --recursive
- set up a virtual host for apachie in /etc/apache2/sites-available/labbook.conf:
# domain: theodorelindsay.com
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@duncanlock.test
ServerName theodorelindsay.com
ServerAlias www.theodorelindsay.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php index.html
DocumentRoot /var/www/labbook/
</VirtualHost>
- restart apache using:
$ sudo a2ensite labbook.conf $ sudo service apache2 reload
Comments
comments powered by Disqus