Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
0afb6b8b
authored
Jun 28, 2022
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
salt fix + HOWTO
parent
cca64022
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
22 deletions
+60
-22
NEW_DEVENV.TXT
+27
-0
install.py
+3
-1
pillar/agentdriver.sls
+1
-1
pillar/installer.sls
+9
-9
salt/manager/files/compile.sh
+7
-1
salt/manager/virtualenv.sls
+3
-0
salt/vmdriver/init.sls
+10
-10
No files found.
NEW_DEVENV.TXT
0 → 100644
View file @
0afb6b8b
#
# HOW-TO create a new devenv
#
#Start a new virt. machine (min 6 RAM, 1 vCPU, 30G Disk)
#rename the fresh virt. hosts if neccesary. eg:
sed -ie 1,\$s/$(hostname)/mycircle-dev/ /etc/hosts
sudo bash -c "echo mycircle-dev > /etc/hostname"
#update the OS
sudo apt-get update && sudo apt-get upgrade -y
sudo reboot
#install python and git
sudo apt install python3 python3-pip git python3-dev -y
#cloden the CIRClE repo
git clone https://git.ik.bme.hu/CIRCLE3/salt.git
#start the CIRCLE install
sudo salt/install --local # --defpass
#
sudo ufw disable
# connet to the portal
install.py
View file @
0afb6b8b
...
@@ -121,6 +121,8 @@ parser.add_argument('--local', action='store_true',
...
@@ -121,6 +121,8 @@ parser.add_argument('--local', action='store_true',
help
=
'Installs Local version'
)
help
=
'Installs Local version'
)
parser
.
add_argument
(
'--upstart'
,
action
=
'store_true'
,
parser
.
add_argument
(
'--upstart'
,
action
=
'store_true'
,
help
=
'Installs UpStart version'
)
help
=
'Installs UpStart version'
)
parser
.
add_argument
(
'--defpass'
,
action
=
'store_true'
,
help
=
'Set admin passwd:12345678'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
@@ -140,7 +142,7 @@ installer_sls = {
...
@@ -140,7 +142,7 @@ installer_sls = {
'deployment_type'
:
deployment_type
,
'deployment_type'
:
deployment_type
,
'init_type'
:
'upstart'
if
args
.
upstart
else
'systemd'
,
'init_type'
:
'upstart'
if
args
.
upstart
else
'systemd'
,
'admin_user'
:
'admin'
,
'admin_user'
:
'admin'
,
'admin_pass'
:
input_admin_password
(),
'admin_pass'
:
'12345678'
if
args
.
defpass
else
input_admin_password
(),
'database'
:
{
'database'
:
{
'name'
:
'circle'
,
'name'
:
'circle'
,
'user'
:
'circle'
,
'user'
:
'circle'
,
...
...
pillar/agentdriver.sls
View file @
0afb6b8b
agentdriver:
agentdriver:
repo_name: https://git.ik.bme.hu/circle3/agentdriver.git
repo_name: https://git.ik.bme.hu/circle3/agentdriver.git
repo_revision:
master
repo_revision:
python3.6
pillar/installer.sls
View file @
0afb6b8b
...
@@ -2,29 +2,29 @@ admin_pass: '12345678'
...
@@ -2,29 +2,29 @@ admin_pass: '12345678'
admin_user: admin
admin_user: admin
amqp:
amqp:
host: 127.0.0.1
host: 127.0.0.1
password:
R6vXml2rkGuJ817I
password:
BXaVnWQzrlvifuEL
port: 5672
port: 5672
user: cloud
user: cloud
vhost: circle
vhost: circle
cache: pylibmc://127.0.0.1:11211/
cache: pylibmc://127.0.0.1:11211/
database:
database:
name: circle
name: circle
password:
x0B5eVNY6ubFSZcU
password:
Pl3S0bayRhO0gFfr
user: circle
user: circle
deployment_type: local
deployment_type: local
fwdriver:
fwdriver:
external_if: eth0
external_if: eth0
external_net: 10.9.0.
101
/16
external_net: 10.9.0.
6
/16
gateway: 10.9.255.254
gateway: 10.9.255.254
management_if: ethy
management_if: ethy
queue_name:
dev-janos
queue_name:
test-dev
trunk_if: linkb
trunk_if: linkb
graphite:
graphite:
host: 127.0.0.1
host: 127.0.0.1
password:
GZgcS9l0XPsDqMQf
password:
UO3xLYBunH1096wt
port: 5672
port: 5672
queue: monitor
queue: monitor
secret_key:
WsJOiKxfND5oSpjX
secret_key:
sfM40GA2U9xvHleY
user: monitor
user: monitor
vhost: monitor
vhost: monitor
init_type: systemd
init_type: systemd
...
@@ -33,10 +33,10 @@ nfs:
...
@@ -33,10 +33,10 @@ nfs:
enabled: true
enabled: true
network: 127.0.0.0/8
network: 127.0.0.0/8
server: 127.0.0.1
server: 127.0.0.1
proxy_secret:
KqSWakUfEb6RZQYj
proxy_secret:
eG9XdDVJiRcA1ahy
secret_key:
NaiuQC6MK5UlcGAB
secret_key:
hfRBwmFxnj2MPYoT
storagedriver:
storagedriver:
queue_name:
dev-janos
queue_name:
test-dev
timezone: Europe/Budapest
timezone: Europe/Budapest
user: cloud
user: cloud
vmdriver:
vmdriver:
...
...
salt/manager/files/compile.sh
View file @
0afb6b8b
#!/bin/bash
#!/bin/bash
#set -e
PATH
=
$PATH
:/usr/bin
cd
/home/
{{
pillar[
'user'
]
}}
/circle/circle/
cd
/home/
{{
pillar[
'user'
]
}}
/circle/circle/
workon circle
source
/home/
{{
pillar[
'user'
]
}}
/.virtualenvs/circle/bin/activate
source
/home/
{{
pillar[
'user'
]
}}
/.virtualenvs/circle/bin/postactivate
MANAGE
=
"python /home/{{ pillar['user'] }}/circle/circle/manage.py"
MANAGE
=
"python /home/{{ pillar['user'] }}/circle/circle/manage.py"
bower install
bower install
...
@@ -23,3 +28,4 @@ else
...
@@ -23,3 +28,4 @@ else
fi
fi
echo
"changed=
$CHANGED
comment='copied:
$COLLECTED
'"
echo
"changed=
$CHANGED
comment='copied:
$COLLECTED
'"
salt/manager/virtualenv.sls
View file @
0afb6b8b
...
@@ -54,6 +54,7 @@ salt://manager/files/syncdb.sh:
...
@@ -54,6 +54,7 @@ salt://manager/files/syncdb.sh:
- stateful: true
- stateful: true
- require:
- require:
- virtualenv: virtualenv_manager
- virtualenv: virtualenv_manager
- file: /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/postactivate
salt://manager/files/compile.sh:
salt://manager/files/compile.sh:
cmd.script:
cmd.script:
...
@@ -64,3 +65,5 @@ salt://manager/files/compile.sh:
...
@@ -64,3 +65,5 @@ salt://manager/files/compile.sh:
- stateful: true
- stateful: true
- require:
- require:
- virtualenv: virtualenv_manager
- virtualenv: virtualenv_manager
- file: /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/postactivate
salt/vmdriver/init.sls
View file @
0afb6b8b
...
@@ -68,16 +68,16 @@ vmdriver:
...
@@ -68,16 +68,16 @@ vmdriver:
# - pkg: ev_repo_for_vmdriver
# - pkg: ev_repo_for_vmdriver
# {% endif %}
# {% endif %}
#
agentdriver_service:
agentdriver_service:
#
service:
service:
#
- name: agentdriver
- name: agentdriver
#
- running
- running
#
- enable: true
- enable: true
#
- watch:
- watch:
#
- pkg: agentdriver
- pkg: agentdriver
#
- sls: agentdriver.gitrepo
- sls: agentdriver.gitrepo
#
- sls: agentdriver.virtualenv
- sls: agentdriver.virtualenv
#
- sls: agentdriver.configuration
- sls: agentdriver.configuration
node:
node:
service:
service:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment