Retire stackforge/nova-salt-formula

This commit is contained in:
Monty Taylor 2015-10-17 16:03:48 -04:00
parent de551e23be
commit 8b05699988
12 changed files with 5 additions and 347 deletions

View File

@ -1,4 +0,0 @@
[gerrit]
host=review.openstack.org
port=29418
project=stackforge/nova-salt-formula.git

View File

@ -1,40 +1,7 @@
============
Nova Formula
============
This project is no longer maintained.
Install and configure the OpenStack Nova service.
The contents of this repository are still available in the Git source code
management system. To see the contents of this repository before it reached
its end of life, please check out the previous commit with
"git checkout HEAD^1".
.. note::
See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
Available states
================
.. contents::
:local:
``nova.db``
-----------
Create the db for Nova service.
``nova.keystone``
-----------------
Init the Nova user, service and endpoint.
``nova.all-in-one``
-------------------
Install the Nova service all in one mode.
``nova.controller``
-------------------
Install the Nova service on controller node.
``nova.compute``
----------------
Install the Nova service on compute node.

View File

@ -1,28 +0,0 @@
{%- from "nova/map.jinja" import nova with context %}
include:
- .base
- .db
- .keystone
- .conf
nova:
pkg.installed:
- refresh: False
- pkgs: {{ nova.all_in_one_pkgs }}
- require_in:
- file: /etc/nova/nova.conf
service.running:
- enable: True
- restart: True
- names: {{ nova.all_in_one_services}}
- require:
- pkg: nova
- watch:
- file: /etc/nova/nova.conf
nova_db_sync:
cmd.run:
- name: nova-manage db sync
- require:
- file: /etc/nova/nova.conf

View File

@ -1,8 +0,0 @@
{%- from "nova/map.jinja" import nova with context %}
pkg-utils:
pkg.installed:
- refresh: False
- pkgs:
- sysfsutils
- {{ nova.conntrack }}

View File

@ -1,21 +0,0 @@
{%- from "nova/map.jinja" import nova with context %}
include:
- .base
- .conf
nova-compute:
pkg.installed:
- refresh: False
- pkgs: {{ nova.compute_pkgs }}
- require_in:
- file: /etc/nova/nova.conf
service.running:
- enable: True
- restart: True
- names: {{ nova.compute_services }}
- require:
- pkg: nova-compute
- file: /etc/nova/nova.conf
- watch:
- file: /etc/nova/nova.conf

View File

@ -1,4 +0,0 @@
/etc/nova/nova.conf:
file.managed:
- source: salt://nova/files/nova.conf
- template: jinja

View File

@ -1,28 +0,0 @@
{%- from "nova/map.jinja" import nova with context %}
include:
- .base
- .db
- .keystone
- .conf
nova:
pkg.installed:
- refresh: False
- pkgs: {{ nova.controller_pkgs }}
- require_in:
- file: /etc/nova/nova.conf
service.running:
- enable: True
- restart: True
- names: {{ nova.controller_services }}
- require:
- pkg: nova
- watch:
- file: /etc/nova/nova.conf
nova_db_sync:
cmd.run:
- name: nova-manage db sync
- require:
- file: /etc/nova/nova.conf

View File

@ -1,14 +0,0 @@
{% set name="nova" %}
{{ name }}-db:
mysql_database.present:
- name: {{ name }}
mysql_user.present:
- name: {{ name }}
- host: "{{ salt["pillar.get"](name + ":mysql:host","localhost") }}"
- password: {{ salt["pillar.get"](name + ":mysql:password") }}
mysql_grants.present:
- host: "{{ salt["pillar.get"](name + ":mysql:host","localhost") }}"
- grant: all privileges
- database: "{{ name }}.*"
- user: {{ name }}

View File

@ -1,16 +0,0 @@
{% from "nova/map.jinja" import nova_config with context -%}
# This file is managed by salt
{% for section, section_values in nova_config | dictsort(true) %}
[{{ section }}]
{%- for key, value in section_values|dictsort(true)%}
{%- if value is string or value is not sequence %}
{{ key }} = {{ value }}
{%- else %}
{%- for v in value %}
{{ key }} = {{ v }}
{%- endfor %}
{%- endif %}
{%- endfor %}
{% endfor %}
{#- vim:ft=sls
-#}

View File

@ -1,26 +0,0 @@
{%- from "openstack/map.jinja" import node with context %}
{%- set name="nova" %}
keystone_{{ name }}_user:
keystone.user_present:
- name: {{ name }}
- password: {{ salt["pillar.get"](name + ":keystone:password") }}
- email: {{ salt["pillar.get"](name + ":keystone:email", name + "@localhost.nolocal")}}
- tenant: service
- enable: True
- roles:
- service:
- admin
keystone_{{ name }}_service:
keystone.service_present:
- name: {{ name }}
- service_type: compute
- description: Openstack Compute Service
keystone_{{ name }}_endpoint:
keystone.endpoint_present:
- name: {{ name }}
- publicurl: http://{{ salt["pillar.get"](name + ":public_ip") }}:8774/v2/%(tenant_id)s
- internalurl: http://{{ salt["pillar.get"](name + ":internal_ip") }}:8774/v2/%(tenant_id)s
- adminurl: http://{{ salt["pillar.get"](name + ":admin_ip") }}:8774/v2/%(tenant_id)s

View File

@ -1,136 +0,0 @@
{% set virt_type="kvm" if grains['virtual'] == "physical" else "qemu" %}
{%- set nova=salt["grains.filter_by"]({
"Debian": {
"name": "nova",
"controller_pkgs": ["nova-api",
"nova-conductor",
"nova-consoleauth",
"nova-novncproxy",
"nova-scheduler",
"python-novaclient"],
"controller_services": ["nova-api",
"nova-conductor",
"nova-consoleauth",
"nova-scheduler"],
"all_in_one_pkgs": ["nova-api",
"nova-compute",
"nova-compute-" + salt["pillar.get"]("nova:config:libvirt:virt_type", virt_type),
"nova-conductor",
"nova-consoleauth",
"nova-novncproxy",
"nova-network",
"nova-scheduler"],
"all_in_one_services": ["nova-api",
"nova-compute",
"nova-conductor",
"nova-consoleauth",
"nova-scheduler",
"nova-network"],
"compute_pkgs": ["nova-network",
"nova-api-metadata",
"nova-compute",
"nova-compute-" + salt["pillar.get"]("nova:config:libvirt:virt_type", virt_type),
],
"compute_services": ["nova-network", "nova-compute"],
"conntrack": "conntrack",
},
"RedHat": {
"name": "nova",
"controller_pkgs": ["openstack-nova-api",
"openstack-nova-conductor",
"openstack-nova-common",
"openstack-nova-novncproxy",
"openstack-nova-scheduler",
"python-novaclient"],
"controller_services": ["openstack-nova-api",
"openstack-nova-conductor",
"openstack-nova-consoleauth",
"openstack-nova-scheduler"],
"compute_pkgs": ["openstack-nova-api",
"openstack-nova-compute",
"openstack-nova-network"],
"compute_services": ["openstack-nova-compute",
"openstack-nova-network",
"openstack-nova-metadata-api"],
"conntrack": "conntrack-tools",
}
}, merge=salt["pillar.get"]("nova:lookup")) %}
# Set the nova default config
{%- set nova_config = {
"DEFAULT": {
"dhcpbridge_flagfile": "/etc/nova/nova.conf",
"dhcpbridge": "/usr/bin/nova-dhcpbridge",
"logdir": "/var/log/nova",
"state_path": "/var/lib/nova",
"lock_path": "/var/lock/nova",
"force_dhcp_release": "True",
"iscsi_helper": "tgtadm",
"root_helper": "sudo nova-rootwrap /etc/nova/rootwrap.conf",
"ec2_private_dns_show_ip": "True",
"api_paste_config": "/etc/nova/api-paste.ini",
"enabled_apis": "ec2,osapi_compute,metadata",
"memcached_servers": salt["pillar.get"]("nova:internal_ip") + ":11211",
"compute_driver": "libvirt.LibvirtDriver",
"auth_strategy": "keystone",
"glance_host": salt["pillar.get"]("nova:glance:host"),
"rpc_backend": "nova.openstack.common.rpc.impl_kombu",
"rabbit_userid": salt["pillar.get"]("nova:rabbitmq:name"),
"rabbit_password": salt["pillar.get"]("nova:rabbitmq:password"),
"rabbit_host": salt["pillar.get"]("nova:rabbitmq:ip"),
"novncproxy_host": "0.0.0.0",
"vncserver_listen": "0.0.0.0",
"novncproxy_base_url": "http://" + salt["pillar.get"]("nova:config:DEFAULT:novncproxy_base_ip") + ":6080/vnc_auto.html",
"vncserver_proxyclient_address": salt["pillar.get"]("nova:internal_ip"),
"network_manager": "nova.network.manager.VlanManager",
"vlan_start": "1000",
"vlan_interface": salt["pillar.get"]("nova:private_interface"),
"multi_host": True,
"send_arp_for_ha": True,
"public_interface": salt["pillar.get"]("nova:public_interface"),
"share_dhcp_address": True,
"dns_server": ["223.6.6.6",
"8.8.4.4"],
"resume_guests_state_on_host_boot": "True",
"snapshot_image_format": "qcow2",
"remove_unused_base_images": "True",
},
"database": {
"connection": ("mysql://nova:" + salt["pillar.get"]("nova:mysql:password") + "@"
+ salt["pillar.get"]("nova:mysql:ip", "localhost")
+ "/nova?charset=utf8")
},
"libvirt": {
"virt_type": virt_type,
"snapshot_compression": "True",
"use_virtio_for_bridges": "True",
"snapshot_compression": "true",
"live_migration_flag": "VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE",
},
"keystone_authtoken":{
"auth_host": salt["pillar.get"]("nova:keystone:host", "localhost"),
"auth_port": 5000,
"auth_protocol": "http",
"admin_tenant_name": "service",
"admin_user" : "nova",
"admin_password": salt["pillar.get"]("nova:keystone:password")
}
} %}
{% for section, value in salt["pillar.get"]("nova:config").iteritems() %}
{% if not nova_config.has_key(section) %}
{% do nova_config.update({ section:{} }) %}
{% endif %}
{% do nova_config[section].update(value) %}
{% endfor %}
{#- vim:ft=sls
-#}

View File

@ -1,24 +0,0 @@
nova:
public_ip: 10.0.0.12
internal_ip: 10.0.0.12
admin_ip: 10.0.0.12
public_interface: eth0
private_interface: eth0
keystone:
password: 'pass'
email: zhang.lei.fly@gmail.com
host: 10.0.0.12
rabbitmq:
name: openstack
password: pass
ip: 10.0.0.12
mysql:
ip: 10.0.0.12
host: '%'
password: pass
config:
DEFAULT:
novncproxy_base_ip:
{#- vim:ft=sls
-#}