Commit 854f912f by Your Name

istall script fix

parent 9a15029f
......@@ -10,7 +10,7 @@ fi
FULLPATH=$(readlink -m $0)
PREFIX=$(dirname $FULLPATH)
pip install -r $PREFIX/requirements.txt
python3 -m pip install -r $PREFIX/requirements.txt
$PREFIX/kvm-ok > /dev/null
retv=$?
......@@ -19,4 +19,4 @@ if [ $retv -eq 0 ]; then
EXTRAPARAMS="--kvm-present"
fi
python $PREFIX/install.py $EXTRAPARAMS $@
python3 $PREFIX/install.py $EXTRAPARAMS $@
......@@ -113,12 +113,15 @@ class KeyStore:
yaml.dump(self.data, f)
parser = argparse.ArgumentParser()
parser.add_argument('--kvm-present', action='store_true',
parser.add_argument('--kvm-present', action='store_true',
help='Installs with KVM hypervisor otherwise with QEMU.')
parser.add_argument('--dev', action='store_true',
help='Installs Develpment version')
parser.add_argument('--local', action='store_true',
help='Installs Develpment version')
parser.add_argument('--dev', action='store_true',
help='Installs Development version')
parser.add_argument('--local', action='store_true',
help='Installs Local version')
parser.add_argument('--upstart', action='store_true',
help='Installs UpStart version')
args = parser.parse_args()
if args.dev or args.local:
......@@ -135,6 +138,7 @@ installer_sls = {
'secret_key': ks.get_key('secret_key'),
'timezone': get_timezone(),
'deployment_type': deployment_type,
'init_type': 'upstart' if args.upstart else 'systemd',
'admin_user': 'admin',
'admin_pass': input_admin_password(),
'database': {
......@@ -193,14 +197,14 @@ opts = config.minion_config('')
opts['file_client'] = 'local'
# NOTE: False will cause salt to only display output
# for states that failed or states that have changes
opts['state_verbose'] = False
opts['state_verbose'] = True
opts['file_roots'] = {'base': [join(PREFIX, 'salt')]}
opts['pillar_roots'] = {'base': [join(PREFIX, 'pillar')]}
setup_console_logger(log_level='info')
caller = salt.client.Caller(mopts=opts)
# Run install with salt
with Halo(text='Installing', spinner='dots'):
result = caller.function('state.sls', 'allinone', with_grains=True)
result = caller.function('state.apply', 'allinone', with_grains=True)
# Count errors and print to console
error_num = 0
......
#user: cloud
#proxy_secret: xooquageire7uX1
#secret_key: Ga4aex3Eesohngo
#timezone: UTC
#deployment_type: local
#init_type: systemd
#admin_user: admin
#admin_pass: admin
#database:
# name: circle
# user: circle
# password: hoGei6paiN0ieda
#amqp:
# user: cloud
# password: password
# host: 127.0.0.1
# port: 5672
# vhost: circle
#graphite:
# user: monitor
# password: monitor
# host: 127.0.0.1
# port: 5672
# vhost: monitor
# queue: monitor
# secret_key: ahf2aim7ahLeo8n
#cache: pylibmc://127.0.0.1:11211/
#nfs:
# enabled: true
# server: 10.0.0.115
# network: 192.168.1.0/24
# directory: /datastore
#storagedriver:
# queue_name: cloud-41125
#fwdriver:
# queue_name: cloud-41125
# gateway: 10.0.255.254
# external_net: 10.9.0.142
# external_if: eth0
# trunk_if: linkb
# management_if: ethy
admin_pass: !!binary |
YWRtaW4=
admin_user: admin
amqp:
host: 127.0.0.1
password: Y4zmHRFVSMaeLcp8
port: 5672
user: cloud
vhost: circle
cache: pylibmc://127.0.0.1:11211/
database:
name: circle
password: an065ZReMOuiwfGW
user: circle
deployment_type: local
fwdriver:
external_if: !!binary |
ZXRoMA==
external_net: !!binary |
MTAuOS4wLjE0Mi8xNg==
gateway: !!binary |
MTAuOS4yNTUuMjU0
management_if: ethy
queue_name: cloud-41125
trunk_if: linkb
graphite:
host: 127.0.0.1
password: mCiHBgpsS9rL64vM
port: 5672
queue: monitor
secret_key: yGWhI0DsEoX7QJzl
user: monitor
vhost: monitor
init_type: systemd
nfs:
directory: /datastore
enabled: true
network: 127.0.0.0/8
server: 127.0.0.1
proxy_secret: bQHgYBlX43aPop5h
secret_key: 95utIBEkwb0a7KSN
storagedriver:
queue_name: cloud-41125
timezone: Europe/Budapest
user: cloud
vmdriver:
hypervisor_type: qemu
......@@ -2,10 +2,10 @@ include:
- profile
- agentdriver
- manager
- graphite
# - graphite
- monitor-client
- storagedriver
- vmdriver
- vncproxy
- fwdriver
# - fwdriver
- network
......@@ -29,8 +29,8 @@ symlink_dhcpd:
- force: True
cmd.run:
- name: /bin/systemctl daemon-reload
- require:
- file: symlink_dhcpd
# - require:
# - file: symlink_dhcpd
{% endif %}
firewall2:
......@@ -51,49 +51,11 @@ reload_firewall:
- cmd: symlink_dhcpd
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
net_config:
file.managed:
- name: /etc/sysconfig/network
- source: salt://network/files/network
- user: root
- group: root
- mode: 644
fix_dhcp:
cmd.script:
- name: salt://network/files/fix_dhcp.sh
- require:
- cmd: reload_firewall
- file: net_config
{% endif %}
isc-dhcp-server:
{% if grains['os_family'] == 'RedHat' or grains['os_family'] == 'Debian' %}
cmd.run:
- name: /bin/systemctl restart dhcpd
{% if grains['os_family'] == 'RedHat' %}
- watch:
- cmd: fix_dhcp
{% elif grains['os_family'] == 'Debian' %}
- watch:
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% endif %}
dhcpd:
service.running:
- enable: True
{% if grains['os_family'] == 'RedHat' %}
- watch:
- cmd: fix_dhcp
{% elif grains['os_family'] == 'Debian' %}
- watch:
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os_family'] == 'Debian' %}
- name: dhcpd
- require:
- cmd: isc-dhcp-server
{% endif %}
- file: symlink_dhcpd
{% if grains['os_family'] == 'Debian' %}
{# For next reboot #}
......@@ -105,10 +67,4 @@ after_openvswitch_conf:
- group: root
- template: jinja
- makedirs: True
fix_dhcp_daemon_reload:
cmd.run:
- name: /bin/systemctl daemon-reload
- require:
- file: after_openvswitch_conf
{% endif %}
augeas_dependency:
pkg.installed:
- pkgs:
- python-augeas
python-augeas:
pkg.installed
libvirtconf:
augeas.change:
......@@ -10,6 +8,13 @@ libvirtconf:
- set listen_tcp 1
- set listen_tls 0
- set auth_tcp "none"
- require:
- pkg: python-augeas
cmd.run:
- user: root
- name: usermod -a -G libvirt {{ pillar['user'] }}
#/etc/default/libvirt-bin:
# file.append:
......
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