This guide is only for the system administrator!
A common task for the system administrator is to setup new webistes. Thankfully this has been simplified a lot by ansible.
Idenfify what the website requires and choose which server to place the site on. Details about the servers can be found here.
Log in to Cloudflare and add a new CNAME record for the new site. Look at the other CNAME records if you get confused.
Create a new user or select a existing one that will become the owner of the website. Instructions for creating a new user can be found on the ansible page.
Create a password for the database that will be created by running
ansible-vault edit vars/passwords.yml. Use a password generator to create the password (at least 16 characters!).
Find the correct file in the ansible/vars folder and add the new site by copying another site and changing the paremeters. The files in ansible/vars are explained on the ansible page.
temp-http. This is because all other templates requires SSL certificates which we will create in a later step.
Run the playbook that corresponds to the file in the vars folder that you added the site to with
Go to the server you selected by using SSH and create a SSL certificate for the new site. Instructions can be found here.
Exit the server and change the template variable to the template that you want to use. List of templates can be found on the ansible page.
You should now have a fully functional website and you can now hand over the new website to its new owner.
On the admins google drive there are two zip files called
base.sql.zip. Downloads these to your computer.
Copy these two files to Babbage by running
scp base.*.zip [email protected]:/home/your_username
SSH into Babbage and unzip the files you copied with
Copy the extracted files to the new site with
cp -R --no-preserve=mode,ownership balen.utn.se/public/ /var/www/<site-name>.utn.se/
Import data to the database from the extracted sql file with
mysql -u[user] -p [database] < balen.sql
Edit the following settings in
You might have to run the drupal7 playbook again and change some permissions. TODO
Update the website. To do this you must stand in the website’s public directory
cd /var/www/<site-name>.utn.se/public. Now run
Go to the login page on the new site
<site-name>.utn.se/user and request a new password. Your email is [email protected]
Once you’ve gained access, create a new admin user for the new owner of the website. Use a dummy password that the owner must change.
Send an email to the new owner with the good news!
Moore differs a bit from Turing and Babbage. New sites are created through the admin panel.
Create a DNS record on cloudflare in the same way as in the instructions for Babbage and Turing.
Add the new domain to the list of server names in the moore playbook in the ansible repository.
Run the moore playbook in the ansible repository. You can use the tag
nginx if you don’t want to update moore to the latest version at the same time.
SSH into the server and add the new domain name to the SSL certificate. Instructions can be found here. Dont forget to reload nginx after this step.
Go to moore and create a new site in wagtail admin. Create a homepage and fill in the english and swedish name for the site.
Create a new website under settings with the URL created in the first step and select the newly created site.
Create a new collection (samling) for the owners of the new website so that they have somewhere to place pictures and videos.
Create a new group or modify an existing and give that group access to the site and the collection for images, documents and videos.
Make sure that the new owner is applied to a position that has the group assigned to it or that the owner is directly assigned to the group.
Tell the new owners that their website is available and tell them that they have their own collection where they can put their images, documents and videos.