README.md 5.63 KB
Newer Older
1
# CIRCLE Project - Salt Installer
2 3 4 5

## OS Support

* Red Hat Linux family:
6
    * Red Hat Enterprise Linux 7+
7
    * Cent OS 7+
8
    * Scientific Linux 7+
9
* Debian Linux family:
10
    * Debian linux 8+
11 12 13 14 15 16 17 18 19 20 21 22 23
    * Ubuntu linux 14.04 LTS

## Prerequisites

### Red Hat family

Install EPEL repository (if the link is broken, please contact us):
```bash
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
```

Install some important packages:
```bash
24
sudo yum install python2-pip gcc vim git
25 26 27 28 29 30
```

### Debian family

Install some important packages:
```bash
Czémán Arnold committed
31
sudo apt-get update
32
sudo apt-get install python-pip vim git
33
```
34 35 36 37

## Install Salt

```bash
38
sudo pip install salt==2014.7.1
39 40 41 42 43 44
```

## Get the installer
Clone circle installer git repository into cloud home

```bash
Bach Dániel committed
45
git clone https://git.ik.bme.hu/circle/salt.git
46 47 48 49 50
```

## Change variables
Modify installer.sls file
```
51
vim salt/pillar/installer.sls
52 53 54
```

Most used variables
55
-------------------
56 57 58
* **proxy_secret**: This is used to provide cryptographic signing, and should be set to a unique, unpredictable value.
* **secret_key**: This is used to provide cryptographic signing, and should be set to a unique, unpredictable value.
* **deployment_type**: local (development) or production
59 60
* **admin_user**: user name to login in as admin on the site
* **admin_pass**: password to login in as admin on the site
61 62 63
* **database**:
    * **password**: database user’s password
* **amqp**:
64
    * **password**: amqp user’s password
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
    * **host**: amqp server IP - usually runs at localhost
* **graphite**:
    * **password**: graphite user’s password
    * **host**: graphite server IP - usually runs at localhost
* **nfs**:
    * **enabled**: nfs is enabled
    * **server**: nfs server’s hostname
    * **network**: nfs server’s network to access files
    * **directory**: this directory will be shared
* **storagedriver**:
    * **queue_name**: the server’s hostname
* **fwdriver**:
    * **queue_name**: the server’s hostname
    * **gateway**: the server’s gateway
    * **external_net**: the server’s network
    * **external_if**: the server’s network interface
81 82 83

Other variables
---------------
84 85 86 87 88 89 90

* user: user who will install the software
* time zone: the server’s time zone, format is region/city
* amqp:
    * user: amqp user
    * port: amqp server’s port
    * vhost: virtual host - specifies the namespace for entities (exchanges and queues) referred to by the protocol
91
* agent:
92
    * repo_revision: revision
93
* agentdriver:
94 95 96 97 98
    * repo_revision: revision
* cache: cache url - usually pylibmc://127.0.0.1:11211/
* database:
    * name: django database’s name
    * user: database user
99
* fwdriver:
100 101 102 103 104
    * repo_revision: revision
    * user: fwdriver user name
    * vm_if: vm interface
    * vm_et: vm network
    * management_if: management interface
105
    * reload_firewall_timeout: timeout for synchronous firewall reload
106 107 108 109
* graphite:
    * user: graphite user
    * port: graphite server’s port
    * secret_key: graphite’s secret key
110
* manager:
111
    * repo_revision: revision
112
* monitor-client:
113
    * repo_revision: revision
114
* storage-driver:
115
    * repo_revision: revision
116
* vm-driver:
117
    * repo_revision: revision
118
* vnc-driver:
119
    * repo_revision: revision
120 121 122 123 124

## Install Circle
Run the following installation command:

```bash
125
sudo salt-call state.sls allinone --local --file-root=/home/$USER/salt/salt --pillar-root=/home/$USER/salt/pillar
126
```
127 128
After this finished, you have to get "Failed: 0" message.
If installer fails, please visit the [Troubleshooting](#troubleshooting) paragraph.
129

130
After install, delete agent.conf or agent.service file:
131

132
If you have upstart:
133
```bash
134 135 136 137 138
sudo rm -f /etc/init/agent.conf
```
Or if you have systemd:
```bash
sudo rm -f /etc/systemd/system/agent.service
139 140
```

141 142
## Quickstart - Standalone Node

143
### Login
144 145 146 147 148
Log in into the Circle website with admin (the site is accessable on the 443 port). Name and password is in the `salt/pillar/installer.sls`.

### Create Node
To run virtual machines, we need to create nodes - and add to the system. Click on the new icon in the dashboard, Nodes menu.

149
#### Configure Node
150 151 152

To standalone configuration, type the current machine's hostname to Host/name, MAC address to Host/MAC, IP to HOST/IP. Choose managed-vm as VLAN.

153
#### Activate Node
154 155 156 157 158 159 160 161 162 163 164 165

Click on the 'Activate' icon to use the Node.

### Start Virtual Machine

To create new Virtual Machine, we use Templates - images based on previously saved VMs. Currently we haven't got any template - so let's create a new one. Click on Templates/new icon and choose 'Create a new base VM without disk'.

#### Configure Template

Set name, CPU and RAM settings, architecture. Check in the boot menu box, select network and lease, write down, which operating system will you use. Finally, create a template.
> The rows marked with astersk need to be filled.

166
![configure standalone node](_static/images/configure_node.jpg)
167 168 169 170

#### Add disk

Currently we don't have any disks attached to our VM. To add, click on the Resources menu, 'create disk' icon, set the name and size.
171

172
![disk setup](_static/images/disk.jpg)
173 174 175 176

#### Attach ISO

To install an OS, we can use ISO images, to boot from. Click on 'download disk' and type the ISO's URL.
177

178
![download iso](_static/images/iso.jpg)
179

180
### Start Virtual Machine
181 182
Finally, we can run the machine. Click on 'deploy' and start it. You can choose, on which node do you want to run.

183 184 185
![ubuntu 14.04](_static/images/ubuntu.png)

## Troubleshooting ##
186

187 188
### Portal won't load
Maybe port 443 is closed. Check and open it.
189 190


191
### Portal won't load on Ubuntu 14.04
192 193 194 195 196 197 198 199
```bash
sudo service nginx restart
```

### Cannot reach the internet on VM-s on distro from Red Hat family
```bash
sudo systemctl restart systemd-sysctl
```