Skip to content
Snippets Groups Projects
Commit e7032fb2 authored by Jonas Kvarnström's avatar Jonas Kvarnström
Browse files

Instruction updates. More work on installing playbooks.

parent a5982693
No related branches found
No related tags found
No related merge requests found
# Installing Required Software on your Development System
The following instructions need to be followed and executed on your *Development System*, regardless of whether this runs in a virtual machine or not.
Unlike the tutorials, where all required software is encapsulated in Docker containers, software development also requires other software installed directly on your *Development System*. This follows the terminology from the [OS installation](install_os.md) page -- the development system is the Ubuntu LTS installation that runs either directly on your computer or in a virtual machine.
### Setting up SSH
The software installation process is mostly automated through [Ansible Playbooks](https://docs.ansible.com/ansible/latest/index.html) ("a repeatable, re-usable, simple configuration management and multi-machine deployment system, one that is well suited to deploying complex applications").
Open a terminal window (on your Development System as defined above!) and execute the following command to update the list of packages available for your system:
```bash
sudo apt update
```
## Setting up SSH
Install the openssh package:
```bash
sudo apt install openssh-server
```
You will be running Ansible Playbooks on your Development System, to install software on the same Development System. However, Ansible is designed to be able to install software on remote hosts as well, so the playbooks will use SSH even for a local installation.
In the instructions below replace USER with the specific name of the user you logged in with.
You can check what name it is by executing the following command to display the value of the USER environment variable:
Open a terminal window on your Development System. Execute the following command to update the list of packages available for your system and to install the OpenSSH server:
```bash
echo $USER
sudo apt update
sudo apt install openssh-server
```
Test if you can ssh from the development system into itself without providing the password. It is necessary for the remaining steps described below.
Test if you can SSH from the development system into itself without providing the password. This is necessary for the remaining steps described below.
```bash
ssh USER@localhost
ssh ${USER}@localhost
```
If you are asked to enter the password, cancel the command (Ctrl+C) and execute the following command to install the needed ssh key:
If you are asked to enter the password, cancel the command (Ctrl+C) and execute the following command to install the needed SSH key:
```bash
ssh-copy-id -i USER@localhost
ssh-copy-id -i ${USER}@localhost
```
If you don't have an SSH key generated on the development system yet, execute:
```bash
ssh-keygen
```
and repeat the previous step. You should now be able to login to the development system using ```ssh USER@localhost```
and repeat the previous step.
### Installing Ansible
You should now be able to login to the development system using `ssh ${USER}@localhost`.
Some of the WARA PS software is installed using [Ansible Playbooks](https://docs.ansible.com/ansible/latest/index.html).
## Installing Ansible
If you use Ubuntu 18.04, you first need to do the following in order to get access to a repository containing the Ansible software:
If you use Ubuntu 18.04, you need to do the following in order to get access to a repository containing the Ansible software:
```bash
## sudo install --reinstall ca-certificates # Had to do this for the apt-add-repository to work
# Only for Ubuntu 18.04!
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
```
......@@ -52,20 +48,19 @@ Regardless of Ubuntu version, continue as follows:
sudo apt install ansible
```
### Installing software using Ansible Playbooks
## Installing software using Ansible Playbooks
Clone our playbooks repo to get access to the actual playbooks for WARA PS:
Clone the `lrs_playbooks` repo in some suitable location to get access to the actual playbooks for WARA PS:
```bash
sudo apt install git
cd ...some suitable location...
git clone https://gitlab.liu.se/lrs/lrs_playbooks.git
```
Run the `wara_develop` playbook as follows to install and update the WARA PS developer software. It can take several minutes to complete.
- In the command below the value of the environment variable specifying the login name is used. You don't have to replace it.
- But make sure you replace the last argument with the actual password of the root/administrator on the development system.
- Make sure you replace the last argument with the actual password of the root/administrator on the development system.
```bash
cd lrs_playbooks
......@@ -73,7 +68,7 @@ git pull
ansible-playbook -i hosts playbooks/wara_develop.yml -e user=${USER} -e install_user=${USER} -e ansible_sudo_pass=******
```
### Finishing Up
## Finishing Up
Add the following commands at the end of the ```~/.bashrc``` file on your development system:
```bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment