Commit 25d261b3 by Szeberényi Imre

installer.py fix, rabbitmq mgr added

parent 250bc29b
...@@ -69,7 +69,7 @@ def input_admin_password(): ...@@ -69,7 +69,7 @@ def input_admin_password():
pw, status = input_password_with_retype() pw, status = input_password_with_retype()
while not status: while not status:
pw, status = input_password_with_retype() pw, status = input_password_with_retype()
return pw.encode('utf8') return str(pw)
def yaml_pretty_dump(data, file, **extra): def yaml_pretty_dump(data, file, **extra):
...@@ -106,7 +106,7 @@ class KeyStore: ...@@ -106,7 +106,7 @@ class KeyStore:
if key is None: if key is None:
key = self.gen_key(16) key = self.gen_key(16)
self.data[name] = key self.data[name] = key
return key return str(key)
def save(self): def save(self):
with open(self.keyfile, 'w') as f: with open(self.keyfile, 'w') as f:
...@@ -173,9 +173,9 @@ installer_sls = { ...@@ -173,9 +173,9 @@ installer_sls = {
'queue_name': get_hostname(), 'queue_name': get_hostname(),
}, },
'fwdriver': { 'fwdriver': {
'gateway': get_default_gw().encode('utf-8'), 'gateway': get_default_gw(),
'external_if': get_interface().encode('utf-8'), 'external_if': get_interface(),
'external_net': get_ip_with_mask(get_interface()).encode('utf-8'), 'external_net': get_ip_with_mask(get_interface()),
'queue_name': get_hostname(), 'queue_name': get_hostname(),
'management_if': 'ethy', 'management_if': 'ethy',
'trunk_if': 'linkb', 'trunk_if': 'linkb',
......
admin_pass: !!binary | admin_pass: admin
YWRtaW4=
admin_user: admin admin_user: admin
amqp: amqp:
host: 127.0.0.1 host: 127.0.0.1
password: Y4zmHRFVSMaeLcp8 password: phvBiu3rPLXaJZc8
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: an065ZReMOuiwfGW password: PmH8Fzdx0LBcl6sr
user: circle user: circle
deployment_type: local deployment_type: local
fwdriver: fwdriver:
external_if: !!binary | external_if: eth0
ZXRoMA== external_net: 10.9.0.55/16
external_net: !!binary | gateway: 10.9.255.254
MTAuOS4wLjE0Mi8xNg==
gateway: !!binary |
MTAuOS4yNTUuMjU0
management_if: ethy management_if: ethy
queue_name: cloud-41125 queue_name: cloud-41174
trunk_if: linkb trunk_if: linkb
graphite: graphite:
host: 127.0.0.1 host: 127.0.0.1
password: mCiHBgpsS9rL64vM password: huWGODFPm1HSgMZk
port: 5672 port: 5672
queue: monitor queue: monitor
secret_key: yGWhI0DsEoX7QJzl secret_key: YK4c6jfDR31HsA0O
user: monitor user: monitor
vhost: monitor vhost: monitor
init_type: systemd init_type: systemd
...@@ -37,10 +33,10 @@ nfs: ...@@ -37,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: bQHgYBlX43aPop5h proxy_secret: P4dFDnXOmvQtKUJ0
secret_key: 95utIBEkwb0a7KSN secret_key: XISvOHyuaWBc89kF
storagedriver: storagedriver:
queue_name: cloud-41125 queue_name: cloud-41174
timezone: Europe/Budapest timezone: Europe/Budapest
user: cloud user: cloud
vmdriver: vmdriver:
......
...@@ -2,7 +2,6 @@ ignore_invalid_headers on; ...@@ -2,7 +2,6 @@ ignore_invalid_headers on;
server { server {
listen 443 ssl default; listen 443 ssl default;
ssl on;
ssl_certificate /etc/ssl/certs/circle.pem; ssl_certificate /etc/ssl/certs/circle.pem;
ssl_certificate_key /etc/ssl/certs/circle.pem; ssl_certificate_key /etc/ssl/certs/circle.pem;
...@@ -40,6 +39,23 @@ server { ...@@ -40,6 +39,23 @@ server {
} }
} }
{% if pillar['deployment_type'] == "local" %}
server {
# listen 8443 ssl default;
listen 8443 default;
# ssl_certificate /etc/ssl/certs/circle.pem;
# ssl_certificate_key /etc/ssl/certs/circle.pem;
location / {
proxy_pass http://localhost:15672;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
{% endif %}
server { server {
listen 80 default; listen 80 default;
......
...@@ -42,4 +42,16 @@ rabbitmq_user_graphite: ...@@ -42,4 +42,16 @@ rabbitmq_user_graphite:
- require: - require:
- service: rabbitmq-server - service: rabbitmq-server
{% if pillar['deployment_type'] == "local" %}
rabbitmq_management:
rabbitmq_plugin.enabled: []
rabbitmq_user_guest:
rabbitmq_user.present:
- name: guest
- password: guest
- perms: [{ {{ pillar['amqp']['vhost']}}: [.*, .*, .*]}, { {{ pillar['graphite']['vhost']}}: [.*, .*, .*]}]
- require:
- service: rabbitmq-server
{% endif %}
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