README.md 5.63 KB
Newer Older
1 2 3 4 5 6 7 8
# Circle Project - Salt Installer

## OS Support

* Red Hat Linux family:
    * Red Hat Enterprise Linux 7+ --> work in progress
    * Cent OS 7+
    * Scientific Linux 7+ --> work in progress
Czémán Arnold committed
9
    * Oracle Linux 7+ --> work in progress
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
* Debian Linux family:
    * Debian linux 8+ --> work in progress
    * Ubuntu linux 14.04 LTS
    * Ubuntu linux 15.04+ --> work in progress

## 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
sudo yum install python-pip gcc vim git
```

### Debian family

Install some important packages:
```bash
sudo apt-get install python-pip git
```
35 36 37 38

## Install Salt

```bash
39
sudo pip install salt==2014.7.1
40 41
```

42

43 44 45 46
## Configure salt
Open the salt minion configuration

```bash
Czémán Arnold committed
47
sudo mkdir -p /etc/salt
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
sudo vim /etc/salt/minion
```

Add these lines:

```bash
file_client: local

file_roots:
  base:
    - /home/cloud/salt/salt

pillar_roots:
  base:
    - /home/cloud/salt/pillar
```
## Get the installer
Clone circle installer git repository into cloud home

```bash
Bach Dániel committed
68
git clone https://git.ik.bme.hu/circle/salt.git
69 70 71 72 73 74 75 76 77
```

## Change variables
Modify installer.sls file
```
sudo vim salt/pillar/installer.sls
```

Most used variables
78
-------------------
79 80 81
* **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
82 83
* **admin_user**: user name to login in as admin on the site
* **admin_pass**: password to login in as admin on the site
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
* **database**:
    * **password**: database user’s password
* **amqp**:
    * **password**: ampq user’s password
    * **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
104 105 106

Other variables
---------------
107 108 109 110 111 112 113

* 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
114
* agent:
115
    * repo_revision: revision
116
* agentdriver:
117 118 119 120 121
    * repo_revision: revision
* cache: cache url - usually pylibmc://127.0.0.1:11211/
* database:
    * name: django database’s name
    * user: database user
122
* fwdriver:
123 124 125 126 127 128 129 130 131
    * repo_revision: revision
    * user: fwdriver user name
    * vm_if: vm interface
    * vm_et: vm network
    * management_if: management interface
* graphite:
    * user: graphite user
    * port: graphite server’s port
    * secret_key: graphite’s secret key
132
* manager:
133
    * repo_revision: revision
134
* monitor-client:
135
    * repo_revision: revision
136
* storage-driver:
137
    * repo_revision: revision
138
* vm-driver:
139
    * repo_revision: revision
140
* vnc-driver:
141
    * repo_revision: revision
142 143 144 145 146 147 148

## Install Circle
Run the following installation command:

```bash
sudo salt-call state.sls allinone
```
149 150
After this finished, you have to get "Failed: 0" message.
If installer fails, please visit the [Troubleshooting](#troubleshooting) paragraph.
151

152
After install, delete agent.conf or agent.service file:
153

154
If you have upstart:
155
```bash
156 157 158 159 160
sudo rm -f /etc/init/agent.conf
```
Or if you have systemd:
```bash
sudo rm -f /etc/systemd/system/agent.service
161 162
```

163 164
## Quickstart - Standalone Node

165
### Login
166 167 168 169 170
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.

171
#### Configure Node
172 173 174

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.

175
#### Activate Node
176 177 178 179 180 181 182 183 184 185 186 187

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.

188
![configure standalone node](_static/images/configure_node.jpg)
189 190 191 192

#### 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.
193

194
![disk setup](_static/images/disk.jpg)
195 196 197 198

#### Attach ISO

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

200
![download iso](_static/images/iso.jpg)
201

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

205 206 207
![ubuntu 14.04](_static/images/ubuntu.png)

## Troubleshooting ##
Czémán Arnold committed
208
Comming soon!