pax_global_header 0000666 0000000 0000000 00000000064 12476722671 0014530 g ustar 00root root 0000000 0000000 52 comment=13d50a60bb3c6ae7825ec8d0a06d63c26b68731e
salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/ 0000775 0000000 0000000 00000000000 12476722671 0025077 5 ustar 00root root 0000000 0000000 salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/.gitignore 0000664 0000000 0000000 00000000017 12476722671 0027065 0 ustar 00root root 0000000 0000000 *.swp
*.swo
*~
salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/GITSALT.md 0000664 0000000 0000000 00000003711 12476722671 0026532 0 ustar 00root root 0000000 0000000
## Git backend tutorial
### 1. Install salt master and register minion
```bash
sudo apt-get install salt-minion
sudo apt-get install salt-master
```
#### Edit /etc/salt/minion to set master to 127.0.0.1
#### Open 4505 and 4506 with ufw allow.
#### Restart master and minion. Accept minion key with salt-key -A.
#### Use -l debug option to show debug messages.
### 2. Install pygit2
#### 2.1 Without adding the repo, installing pygit is a bit difficult. Use this:
```bash
sudo add-apt-repository ppa:dennis/python
sudo apt-get update
sudo apt-get install python-pygit2
```
#### 2.2 Copy keys.
### 3. Modify the *master* config file:
```yaml
fileserver_backend:
- git
gitfs_remotes:
- git@git.ik.bme.hu:circle/salt.git:
- pubkey: /root/.ssh/git.pub
- privkey: /root/.ssh/git
pillar_roots:
base:
- /home/cloud/salt/pillar
gitfs_root: salt
```
### 4. Clone pillar to /home/cloud/
```bash
git clone `https://git.ik.bme.hu/circle/salt.git
```
### 5. Finish: call salt '*' state.sls allinone (or whatever you need)
### the *master* config file:
#### The default git provider is pygit2. You can change that to dulwich ot gitpython.
```yaml
gitfs_provider: dulwich
```
#### Include git in the fileserver_backend list:
```yaml
fileserver_backend:
- git
```
#### Specify one or more git://, https://, file://, or ssh:// URLs in gitfs_remotes to configure which repositories to cache and search for requested files:
```yaml
gitfs_remotes:
- git@git.ik.bme.hu:circle/salt.git
```
> The gitfs_remotes option accepts an ordered list of git remotes to cache and search, in listed order, for requested files.
#### Serving from subdirectory
```yaml
gitfs_root: foo/baz
```
#### Other options
Its possible to change branches, enviroments
Change branch:
```yaml
gitfs_base: salt-base
```
### Tutorial with more information:
http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
### Local gitfs issue:
https://github.com/saltstack/salt/issues/6660
salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/README.md 0000664 0000000 0000000 00000007241 12476722671 0026362 0 ustar 00root root 0000000 0000000
# Circle Project Salt Installer
## Add vlan
Before starting the machine - add LAB vlan.
## Install Salt
```bash
sudo add-apt-repository ppa:saltstack/salt
sudo apt-get update
sudo apt-get install salt-minion
```
## Configure salt
Open the salt minion configuration
```bash
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
git clone git@git.ik.bme.hu:circle/salt.git
```
## Remove node row from pillar/top.sls
## Change variables
Modify installer.sls file
```
sudo vim salt/pillar/installer.sls
```
Most used variables
* **admin_user**: user name to login in as admin on the site
* **admin_pass**: password to login in as admin on the site
* time zone: the server's time zone, format is region/city
* nfs
* server: nfs server's hostname
* network: nfs server's network to access files
* directory: this directory will be shared
* storagedriver:
* **queue_name***: storage host name
* 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
> **`*`** These variables need to be configured. Use `hostname`, `ifconfig`, `route -n` to get network information.
## Install Circle
Run the following installation command:
```bash
sudo salt-call state.sls allinone
```
After install, delete agent.conf file:
```bash
sudo rm /etc/init/agent.conf
```
### Current problems
#### Gateway issue
```
cd circle/circle/
workon circle
./manage.py firewall_restart
# get eth0 MAC address
ifconfig
sudo -i
ip netns exec fw bash
ifconfig net hw ether
```
#### Nginx issue
Delete configuration file duplication and restart nginx
```
sudo rm /etc/nginx/sites-enabled/default
sudo service nginx restart
```
#### Open firewall
```
sudo ufw allow 443
sudo ufw allow 80
```
## Quickstart - Standalone Node
### Login
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.
#### Configure Node
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.
#### Activate Node
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.
![configure standalone node](docs/images/configure_node.jpg)
#### 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.
![disk setup](docs/images/disk.jpg)
#### Attach ISO
To install an OS, we can use ISO images, to boot from. Click on 'download disk' and type the ISO's URL.
![download iso](docs/images/iso.jpg)
### Start Virtual Machine
Finally, we can run the machine. Click on 'deploy' and start it. You can choose, on which node do you want to run.
![ubuntu 14.04](docs/images/ubuntu.png)
salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/docs/ 0000775 0000000 0000000 00000000000 12476722671 0026027 5 ustar 00root root 0000000 0000000 salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/docs/images/ 0000775 0000000 0000000 00000000000 12476722671 0027274 5 ustar 00root root 0000000 0000000 configure_node.jpg 0000664 0000000 0000000 00000144674 12476722671 0032725 0 ustar 00root root 0000000 0000000 salt-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e-13d50a60bb3c6ae7825ec8d0a06d63c26b68731e/docs/images JFIF
%# , #&')*)-0-(0%()(
((((((((((((((((((((((((((((((((((((((((((((((((((( W
} !1AQa"q2#BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w !1AQaq"2B #3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? A!y!rM ha a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a õ|iCumFvsCx3} z/ o
: (
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
~9-/?SPW(N
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
( 8K|K `o@ J Ӡ
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
( : E5 u~ =Ҁ4{zwz{ڀP #6 ۅ - P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ s [_\覠Pxwx{T%.#役P%Y{8?".~_ůxr]%."eY0[h'鎼C?_G-4]+MV֮b3H*D
3pz@ ͠:\V"3,^{:4)Ƞ
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
( $Ŀ M@_ oW?/Nq* xr? 4Etgp::j wxloc<
1*g]?GkW֚~<J|ppNH 4Z\V֖E+jͭ]
][iM
Ʋ+p9rv1eKWZ4;=CKZ̰dɉՀ{+|@[jej͉I6Ȁ)] Dz u P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@ P@/%% uj 7 { ]$6TWVVPGq@ZoevJTz 8btu9ul-PvIr$p8a@;j+s]({tA4FWnҼc=K[{y-a$n\`y(B Nԭ$4a9izN`-l'&;hV%'
?: (
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
~9 .'SPW(N
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
( 8KI `o@ J Ӡ
(
(
(
( h
(
(
(
(
(
(
(
(
(
(
(
(
( 8_K|K `o@ J }yocm%V2Q~x@ƭ`a^y7Vņ@C}[v9 _ =s@@ P@ P@ ̞L:P
鐞p~b{O&/M g h = | @?_? >q ? ) {O&4 }e S /M g h = | @?_? >q ? ) {O&4 }e S /M g h = | @?_? >q ? ) {O&4 }e S /M g h = | @?_? >q ? ) {O&4 }e S /M g h = | @?_? >q ? ) {O&4 }e S /M g h = | @?_? Og?e?
[WI$30v@p$ [
(
~9 -/?SPW(ӁY{q 2ܴ&O nkx5{2Cmd܃=v*rU eϋ3ztf6P7 .`,0& .?} _xm.D7;@YNr78A@5k3éKj&Ӛ{JD%If?63(>ͨK\~b8d#Ґ72 Nh
(
( *C:}ro@W gj1:f#*s4x6 @4 q(?XY5dL THý ?LԖYA<.2pHz \`x