changed all yml occurrences to yaml
This commit is contained in:
parent
65fe388ab8
commit
ecfb5b10e2
@ -242,7 +242,7 @@ functional way, and in particular avoid `for` loops. Here's an example:
|
|||||||
```python
|
```python
|
||||||
from solar import template
|
from solar import template
|
||||||
|
|
||||||
nodes = template.nodes_from('templates/riak_nodes.yml')
|
nodes = template.nodes_from('templates/riak_nodes.yaml')
|
||||||
|
|
||||||
riak_services = nodes.on_each(
|
riak_services = nodes.on_each(
|
||||||
'resources/riak_node',
|
'resources/riak_node',
|
||||||
|
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@ -20,9 +20,9 @@ require 'yaml'
|
|||||||
VAGRANTFILE_API_VERSION = "2"
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
# configs, custom updates _defaults
|
# configs, custom updates _defaults
|
||||||
defaults_cfg = YAML.load_file('vagrant-settings.yml_defaults')
|
defaults_cfg = YAML.load_file('vagrant-settings.yaml_defaults')
|
||||||
if File.exist?('vagrant-settings.yml')
|
if File.exist?('vagrant-settings.yaml')
|
||||||
custom_cfg = YAML.load_file('vagrant-settings.yml')
|
custom_cfg = YAML.load_file('vagrant-settings.yaml')
|
||||||
cfg = defaults_cfg.merge(custom_cfg)
|
cfg = defaults_cfg.merge(custom_cfg)
|
||||||
else
|
else
|
||||||
cfg = defaults_cfg
|
cfg = defaults_cfg
|
||||||
@ -36,13 +36,13 @@ def ansible_playbook_command(filename, args=[])
|
|||||||
"ansible-playbook -v -i \"localhost,\" -c local /vagrant/bootstrap/playbooks/#{filename} #{args.join ' '}"
|
"ansible-playbook -v -i \"localhost,\" -c local /vagrant/bootstrap/playbooks/#{filename} #{args.join ' '}"
|
||||||
end
|
end
|
||||||
|
|
||||||
solar_script = ansible_playbook_command("solar.yml")
|
solar_script = ansible_playbook_command("solar.yaml")
|
||||||
|
|
||||||
slave_script = ansible_playbook_command("custom-configs.yml", ["-e", "master_ip=10.0.0.2"])
|
slave_script = ansible_playbook_command("custom-configs.yaml", ["-e", "master_ip=10.0.0.2"])
|
||||||
|
|
||||||
master_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "slave"])
|
master_celery = ansible_playbook_command("celery.yaml", ["--skip-tags", "slave"])
|
||||||
|
|
||||||
slave_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "master"])
|
slave_celery = ansible_playbook_command("celery.yaml", ["--skip-tags", "master"])
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
sudo: yes
|
sudo: yes
|
||||||
tasks:
|
tasks:
|
||||||
- include: tasks/base.yml
|
- include: tasks/base.yaml
|
||||||
- include: tasks/puppet.yml
|
- include: tasks/puppet.yaml
|
||||||
- include: tasks/docker.yml
|
- include: tasks/docker.yaml
|
||||||
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
|
#- include: celery.yaml tags=['master'] celery_dir=/var/run/celery
|
||||||
- include: tasks/cloud_archive.yml
|
- include: tasks/cloud_archive.yaml
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"type": "ansible-local",
|
"type": "ansible-local",
|
||||||
"playbook_dir": "playbooks",
|
"playbook_dir": "playbooks",
|
||||||
"playbook_file": "playbooks/build-main.yml",
|
"playbook_file": "playbooks/build-main.yaml",
|
||||||
"extra_arguments": ["--verbose"]
|
"extra_arguments": ["--verbose"]
|
||||||
}],
|
}],
|
||||||
"post-processors": [{
|
"post-processors": [{
|
||||||
|
@ -47,8 +47,8 @@ def deploy():
|
|||||||
db.clear()
|
db.clear()
|
||||||
signals.Connections.clear()
|
signals.Connections.clear()
|
||||||
|
|
||||||
node1 = vr.create('nodes', 'templates/nodes.yml', {})[0]
|
node1 = vr.create('nodes', 'templates/nodes.yaml', {})[0]
|
||||||
seed = vr.create('nodes', 'templates/seed_node.yml', {})[0]
|
seed = vr.create('nodes', 'templates/seed_node.yaml', {})[0]
|
||||||
|
|
||||||
ssh_key = vr.create('ssh_key1', 'resources/ssh_key', {
|
ssh_key = vr.create('ssh_key1', 'resources/ssh_key', {
|
||||||
'keys_dir': '/vagrant/.ssh',
|
'keys_dir': '/vagrant/.ssh',
|
||||||
|
@ -41,7 +41,7 @@ def setup_resources():
|
|||||||
|
|
||||||
signals.Connections.clear()
|
signals.Connections.clear()
|
||||||
|
|
||||||
node1, node2 = vr.create('nodes', 'templates/nodes.yml', {})
|
node1, node2 = vr.create('nodes', 'templates/nodes.yaml', {})
|
||||||
|
|
||||||
# MARIADB
|
# MARIADB
|
||||||
mariadb_service1 = vr.create('mariadb_service1', 'resources/mariadb_service', {
|
mariadb_service1 = vr.create('mariadb_service1', 'resources/mariadb_service', {
|
||||||
|
@ -14,7 +14,7 @@ signals.Connections.clear()
|
|||||||
from solar import template
|
from solar import template
|
||||||
|
|
||||||
|
|
||||||
nodes = template.nodes_from('templates/riak_nodes.yml')
|
nodes = template.nodes_from('templates/riak_nodes.yaml')
|
||||||
|
|
||||||
riak_services = nodes.on_each(
|
riak_services = nodes.on_each(
|
||||||
'resources/riak_node',
|
'resources/riak_node',
|
||||||
|
@ -28,7 +28,7 @@ def setup_riak():
|
|||||||
db.clear()
|
db.clear()
|
||||||
signals.Connections.clear()
|
signals.Connections.clear()
|
||||||
|
|
||||||
nodes = vr.create('nodes', 'templates/riak_nodes.yml', {})
|
nodes = vr.create('nodes', 'templates/riak_nodes.yaml', {})
|
||||||
node1, node2, node3 = nodes
|
node1, node2, node3 = nodes
|
||||||
|
|
||||||
riak_services = []
|
riak_services = []
|
||||||
|
@ -2,8 +2,8 @@ id: mariadb_db
|
|||||||
handler: ansible
|
handler: ansible
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
actions:
|
actions:
|
||||||
run: run.yml
|
run: run.yaml
|
||||||
remove: remove.yml
|
remove: remove.yaml
|
||||||
input:
|
input:
|
||||||
db_name:
|
db_name:
|
||||||
schema: str!
|
schema: str!
|
||||||
|
@ -2,8 +2,8 @@ id: mariadb_user
|
|||||||
handler: ansible
|
handler: ansible
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
actions:
|
actions:
|
||||||
run: run.yml
|
run: run.yaml
|
||||||
remove: remove.yml
|
remove: remove.yaml
|
||||||
input:
|
input:
|
||||||
user_password:
|
user_password:
|
||||||
schema: str!
|
schema: str!
|
||||||
|
@ -2,7 +2,7 @@ id: riak_join_single
|
|||||||
handler: ansible
|
handler: ansible
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
actions:
|
actions:
|
||||||
join: actions/join.yml
|
join: actions/join.yaml
|
||||||
input:
|
input:
|
||||||
join_to:
|
join_to:
|
||||||
schema: str!
|
schema: str!
|
||||||
|
@ -2,9 +2,9 @@ id: riak_node
|
|||||||
handler: ansible
|
handler: ansible
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
actions:
|
actions:
|
||||||
commit: actions/commit.yml
|
commit: actions/commit.yaml
|
||||||
run: actions/run.yml
|
run: actions/run.yaml
|
||||||
join: actions/join.yml
|
join: actions/join.yaml
|
||||||
input:
|
input:
|
||||||
ip:
|
ip:
|
||||||
schema: str!
|
schema: str!
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
sudo: yes
|
sudo: yes
|
||||||
tasks:
|
tasks:
|
||||||
- script: /vagrant/bootstrap/playbooks/files/ubuntu-ansible.sh
|
- script: /vagrant/bootstrap/playbooks/files/ubuntu-ansible.sh
|
||||||
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
|
#- include: celery.yaml tags=['master'] celery_dir=/var/run/celery
|
||||||
- include: /vagrant/bootstrap/playbooks/build-main.yml
|
- include: /vagrant/bootstrap/playbooks/build-main.yaml
|
||||||
- include: /vagrant/bootstrap/playbooks/custom-configs.yml master_ip={{ master_ip }}
|
- include: /vagrant/bootstrap/playbooks/custom-configs.yaml master_ip={{ master_ip }}
|
||||||
- include: /vagrant/bootstrap/playbooks/celery.yml tags=slave
|
- include: /vagrant/bootstrap/playbooks/celery.yaml tags=slave
|
||||||
|
@ -63,7 +63,7 @@ def riak_plan():
|
|||||||
riak_path = os.path.join(
|
riak_path = os.path.join(
|
||||||
os.path.dirname(os.path.realpath(__file__)),
|
os.path.dirname(os.path.realpath(__file__)),
|
||||||
'orch_fixtures',
|
'orch_fixtures',
|
||||||
'riak.yml')
|
'riak.yaml')
|
||||||
return graph.create_plan(riak_path, save=False)
|
return graph.create_plan(riak_path, save=False)
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ def seq_plan():
|
|||||||
seq_path = os.path.join(
|
seq_path = os.path.join(
|
||||||
os.path.dirname(os.path.realpath(__file__)),
|
os.path.dirname(os.path.realpath(__file__)),
|
||||||
'orch_fixtures',
|
'orch_fixtures',
|
||||||
'sequential.yml')
|
'sequential.yaml')
|
||||||
return graph.create_plan(seq_path, save=False)
|
return graph.create_plan(seq_path, save=False)
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ def ext_encoder(fpath):
|
|||||||
ext = os.path.splitext(os.path.basename(fpath))[1].strip('.')
|
ext = os.path.splitext(os.path.basename(fpath))[1].strip('.')
|
||||||
if ext in ['json']:
|
if ext in ['json']:
|
||||||
return json
|
return json
|
||||||
elif ext in ['yaml', 'yml']:
|
elif ext in ['yaml', 'yaml']:
|
||||||
return yaml
|
return yaml
|
||||||
|
|
||||||
raise Exception('Unknown extension {}'.format(ext))
|
raise Exception('Unknown extension {}'.format(ext))
|
||||||
|
@ -19,7 +19,7 @@ resources:
|
|||||||
ssh_key: '{{ssh_key}}'
|
ssh_key: '{{ssh_key}}'
|
||||||
|
|
||||||
- id: keystone_base
|
- id: keystone_base
|
||||||
from: templates/keystone_base.yml
|
from: templates/keystone_base.yaml
|
||||||
values:
|
values:
|
||||||
login_user: root
|
login_user: root
|
||||||
login_password: 'mariadb_service::root_password'
|
login_password: 'mariadb_service::root_password'
|
||||||
@ -33,7 +33,7 @@ resources:
|
|||||||
ssh_key: '{{ssh_key}}'
|
ssh_key: '{{ssh_key}}'
|
||||||
|
|
||||||
- id: keystone_api_1
|
- id: keystone_api_1
|
||||||
from: templates/keystone_api.yml
|
from: templates/keystone_api.yaml
|
||||||
values:
|
values:
|
||||||
idx: 1
|
idx: 1
|
||||||
db_password: 'keystone_db_user::user_password'
|
db_password: 'keystone_db_user::user_password'
|
||||||
@ -49,7 +49,7 @@ resources:
|
|||||||
ssh_key: '{{ssh_key}}'
|
ssh_key: '{{ssh_key}}'
|
||||||
|
|
||||||
- id: openstack_base
|
- id: openstack_base
|
||||||
from: templates/openstack_base.yml
|
from: templates/openstack_base.yaml
|
||||||
values:
|
values:
|
||||||
ip: '{{ip}}'
|
ip: '{{ip}}'
|
||||||
ssh_user: '{{ssh_user}}'
|
ssh_user: '{{ssh_user}}'
|
||||||
|
@ -2,7 +2,7 @@ id: glance_{{idx}}
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- id: glance_base_{{ idx }}
|
- id: glance_base_{{ idx }}
|
||||||
from: templates/glance_db.yml
|
from: templates/glance_db.yaml
|
||||||
values:
|
values:
|
||||||
idx: '{{ idx }}'
|
idx: '{{ idx }}'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# rename it to vagrant-settings.yml then Vagrantfile
|
# rename it to vagrant-settings.yaml then Vagrantfile
|
||||||
# will use values from this file
|
# will use values from this file
|
||||||
|
|
||||||
slaves_count: 2
|
slaves_count: 2
|
||||||
|
Loading…
Reference in New Issue
Block a user