Commit f4c31e6a by Szeberényi Imre

Merge branch 'master' of https://git.ik.bme.hu/CIRCLE3/salt

parents d9b501ff d11ab984
......@@ -3,139 +3,54 @@
## OS Support
* Red Hat Linux family:
* Red Hat Enterprise Linux 7+
* Cent OS 7+
* Scientific Linux 7+
* under development
* Debian Linux family:
* Debian linux 8+
* Ubuntu linux 14.04 LTS
* Ubuntu linux 18.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
sudo yum install python2-pip gcc vim git
```
TBD
### Debian family
Install some important packages:
```bash
sudo apt-get update
sudo apt-get install python-pip vim git
```
## Install Salt
For Devenv start a new ubuntu 18.04 with least 4G RAM.
Set the proper hostname.
In circle VMs you can set the name to mycircel-dev using the following commands.
```bash
sudo pip install salt==2014.7.1
sudo sed -ie 1,\$s/$(hostname)/mycircle-dev/ /etc/hosts
sudo bash -c "echo mycircle-dev > /etc/hostname"
sudo reboot - it not neccessary because the next steps
```
## Get the installer
Clone circle installer git repository into cloud home
Refresh your system:
```bash
git clone https://git.ik.bme.hu/circle/salt.git
sudo apt update && sudo apt upgrade -y
sudo reboot
```
## Change variables
Modify installer.sls file
```
vim salt/pillar/installer.sls
Install some important packages
```bash
sudo apt install python3 python3-pip python3-dev virtualenvwrapper git vim -y
```
Most used variables
-------------------
* **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
* **admin_user**: user name to login in as admin on the site
* **admin_pass**: password to login in as admin on the site
* **database**:
* **password**: database user’s password
* **amqp**:
* **password**: amqp 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
Other variables
---------------
* 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
* agent:
* repo_revision: revision
* agentdriver:
* repo_revision: revision
* cache: cache url - usually pylibmc://127.0.0.1:11211/
* database:
* name: django database’s name
* user: database user
* fwdriver:
* repo_revision: revision
* user: fwdriver user name
* vm_if: vm interface
* vm_et: vm network
* management_if: management interface
* reload_firewall_timeout: timeout for synchronous firewall reload
* graphite:
* user: graphite user
* port: graphite server’s port
* secret_key: graphite’s secret key
* manager:
* repo_revision: revision
* monitor-client:
* repo_revision: revision
* storage-driver:
* repo_revision: revision
* vm-driver:
* repo_revision: revision
* vnc-driver:
* repo_revision: revision
## Install Circle
Run the following installation command:
## Get the installer
Clone circle installer git repository into cloud home
```bash
sudo salt-call state.sls allinone --local --file-root=/home/$USER/salt/salt --pillar-root=/home/$USER/salt/pillar
git clone https://git.ik.bme.hu/CIRCLE3/salt.git
```
After this finished, you have to get "Failed: 0" message.
If installer fails, please visit the [Troubleshooting](#troubleshooting) paragraph.
After install, delete agent.conf or agent.service file:
If you have upstart:
## Single node quick install
```bash
sudo rm -f /etc/init/agent.conf
sudo salt/install --local [--defpass]
```
Or if you have systemd:
```bash
sudo rm -f /etc/systemd/system/agent.service
Open the port 443 for the portal
```bash
ufw allow 443
```
## Quickstart - Standalone Node
......
......@@ -2,29 +2,29 @@ admin_pass: Dejo12Cuccos
admin_user: admin
amqp:
host: 127.0.0.1
password: 3U8pKWMrXwvTl0By
password: dbtNFSc6OoinjM5e
port: 5672
user: cloud
vhost: circle
cache: pylibmc://127.0.0.1:11211/
database:
name: circle
password: 5073G0NlRCfHtXhc
password: jgdxM2FGEAS0HRBb
user: circle
deployment_type: local
fwdriver:
external_if: enp5s0f1
external_net: 10.4.0.204/16
gateway: 10.4.255.254
external_if: eth0
external_net: 10.34.0.108/16
gateway: 10.34.255.254
management_if: ethy
queue_name: wombat
queue_name: cloud-17198
trunk_if: linkb
graphite:
host: 127.0.0.1
password: jObTZWyvd7zioM1u
password: z9qeb74Go2hHgByL
port: 5672
queue: monitor
secret_key: 17Z0LiChQm5lqUfe
secret_key: R5NlO0KUprq1Z297
user: monitor
vhost: monitor
init_type: systemd
......@@ -33,11 +33,11 @@ nfs:
enabled: true
network: 127.0.0.0/8
server: 127.0.0.1
proxy_secret: r9l2JkQ6YIo4KNgf
secret_key: M4mF9OcrKQwx6Sgq
proxy_secret: 1FfsO9LbWTlagdVG
secret_key: EC0xuaGiMSY9VhAe
storagedriver:
queue_name: wombat
timezone: Etc/UTC
queue_name: cloud-17198
timezone: Europe/Budapest
user: cloud
vmdriver:
hypervisor_type: kvm
hypervisor_type: qemu
......@@ -17,6 +17,16 @@ requirement0:
- require:
- user: {{ pillar['graphite']['user'] }}
requirement1:
file.managed:
- name: /home/{{ pillar['graphite']['user'] }}/requirement1.txt
- template: jinja
- source: salt://graphite/files/requirement1.txt
- user: {{ pillar['graphite']['user'] }}
- group: {{ pillar['graphite']['user'] }}
- require:
- user: {{ pillar['graphite']['user'] }}
requirements:
file.managed:
- name: /home/{{ pillar['graphite']['user'] }}/requirements.txt
......
......@@ -6,8 +6,8 @@ After=network.target
User={{ pillar['graphite']['user'] }}
Group={{ pillar['graphite']['user'] }}
Environment=PYTHONPATH=/opt/graphite/lib GRAPHITE_ROOT=/opt/graphite
WorkingDirectory=/opt/graphite/bin/
ExecStart=/bin/bash -c "source /etc/profile; workon graphite; exec twistd --nodaemon --reactor=epoll --no_save carbon-cache"
WorkingDirectory=/home/{{ pillar['graphite']['user'] }}
ExecStart=/bin/bash -c "source /etc/profile; workon graphite; cd /opt/graphite/bin/; exec twistd --nodaemon --reactor=epoll --no_save carbon-cache"
Restart=always
[Install]
......
#
--no-binary=:all: -r requirements.txt
--no-binary=:all: -r requirement1.txt
#
graphite-web
whisper
carbon
python-memcached
whisper @ https://github.com/graphite-project/whisper/tarball/master
carbon @ https://github.com/graphite-project/carbon/tarball/master
graphite-web @ https://github.com/graphite-project/graphite-web/tarball/master
Django == 3.0.14
Twisted == 22.4.0
txAMQP
......
......@@ -2,15 +2,31 @@ virtualenv_graphite:
virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite
- requirements: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- requirements: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- user: {{ pillar['graphite']['user'] }}
- cwd: /home/{{ pillar['graphite']['user'] }}
- no_chown: true
- require:
- user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite
virtualenv_graphite_web:
virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite
- requirements: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- user: {{ pillar['graphite']['user'] }}
- cwd: /home/{{ pillar['graphite']['user'] }}
- no_chown: true
- no_binary: all
- env_vars:
PYTHONIOENCODING: 'utf-8'
- require:
- virtualenv: virtualenv_graphite
- user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /home/{{ pillar['graphite']['user'] }}/requirement1.txt
- file: /opt/graphite
global-site-packages:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment