Retire stackforge/cinder-salt-formula

This commit is contained in:
Monty Taylor 2015-10-17 16:02:40 -04:00
parent 371ecb7900
commit 3ba9192f78
11 changed files with 5 additions and 248 deletions

View File

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

View File

@ -1,45 +1,7 @@
==============
Cinder Formula
==============
This project is no longer maintained.
Install and configure the OpenStack Cinder 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:
``cinder``
----------
Install the Cinder and enable the service.
``cinder.db``
-------------
Create the db for Cinder service.
``cinder.keystone``
-------------------
Init the Cinder user, service and endpoint.
``cinder.server``
-----------------
Install the Cinder and enable the service.
``cinder.client``
-----------------
Install the python-cinderclient package.
``cinder.volume``
-----------------
Install the Cinder Volume Service

View File

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

View File

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

View File

@ -1,10 +0,0 @@
{% from "cinder/map.jinja" import cinder_config with context -%}
# This file is managed by salt
{% for section, section_values in cinder_config | dictsort(true) %}
[{{ section }}]
{%- for key, value in section_values| dictsort(true) %}
{{ key }} = {{ value }}
{%- endfor %}
{% endfor %}
{#- vim:ft=sls
-#}

View File

@ -1,2 +0,0 @@
include:
- .server

View File

@ -1,23 +0,0 @@
keystone_cinder_user:
keystone.user_present:
- name: cinder
- password: {{ salt['pillar.get']('cinder:keystone:password') }}
- email: {{ salt['pillar.get']('cinder:keystone:email', 'cinder@nolocal.com')}}
- tenant: service
- enable: True
- roles:
- service:
- admin
keystone_cinder_service:
keystone.service_present:
- name: cinder
- service_type: volume
- description: Openstack Volume Service
keystone_cinder_endpoint:
keystone.endpoint_present:
- name: cinder
- publicurl: http://{{ salt["pillar.get"]("cinder:public_ip") }}:8776/v1/%(tenant_id)s
- internalurl: http://{{ salt["pillar.get"]("cinder:internal_ip") }}:8776/v1/%(tenant_id)s
- adminurl: http://{{ salt["pillar.get"]("cinder:admin_ip") }}:8776/v1/%(tenant_id)s

View File

@ -1,78 +0,0 @@
{% set cinder=salt["grains.filter_by"]({
"Debian":{
"name": "cinder",
"server_pkgs": ["cinder-api",
"cinder-scheduler",
"cinder-backup",
"python-cinderclient"],
"server_services": ["cinder-api",
"cinder-scheduler"],
"client_pkg": "python-cinderclient",
"cinder_volume": "cinder-volume",
"cinder_volume_service": "cinder-volume",
},
"RedHat":{
"name": "cinder",
"server_pkgs": ["openstack-cinder"],
"server_services": ["openstack-cinder-api",
"openstack-cinder-scheduler"],
"client_pkg": "python-cinderclient",
"cinder_volume": "openstack-cinder",
"cinder_volume_service": "openstack-cinder-volume",
},
"default":{
"name": "cinder",
"server_pkgs": ["cinder-api",
"cinder-scheduler",
"cinder-backup"],
"server_services": ["cinder-api",
"cinder-scheduler",
"cinder-backup"],
"client_pkg": "python-cinderclient",
"cinder_volume": "cinder-volume",
"cinder_volume_service": "cinder-volume",
}
}, merge=salt["pillar.get"]("cinder:lookup")) %}
{%- set cinder_config = {
"DEFAULT": {
"rootwrap_config": "/etc/cinder/rootwrap.conf",
"api_paste_confg": "/etc/cinder/api-paste.ini",
"iscsi_helper": "tgtadm",
"volume_name_template": "volume-%s",
"volume_group": "cinder-volumes",
"verbose": "False",
"auth_strategy": "keystone",
"state_path": "/var/lib/cinder",
"lock_path": "/var/lock/cinder",
"volumes_dir": "/var/lib/cinder/volumes",
"rpc_backend": "cinder.openstack.common.rpc.impl_kombu",
"rabbit_userid": salt["pillar.get"]("cinder:rabbitmq:name"),
"rabbit_password": salt["pillar.get"]("cinder:rabbitmq:password"),
},
"database": {
"connection": ("mysql://cinder:" + salt["pillar.get"]("cinder:mysql:password") + "@"
+ salt["pillar.get"]("cinder:mysql:ip", "localhost")
+ "/cinder?charset=utf8")
},
"keystone_authtoken":{
"auth_host": salt["pillar.get"]("cinder:keystone:host", "localhost"),
"auth_port": 5000,
"auth_protocol": "http",
"admin_tenant_name": "service",
"admin_user" : "cinder",
"admin_password": salt["pillar.get"]("cinder:keystone:password")
}
}
%}
{% for section, value in salt["pillar.get"]("cinder:config").iteritems() %}
{% if not cinder_config.has_key(section) %}
{% do cinder_config.update({ section:{} }) %}
{% endif %}
{% do cinder_config[section].update(value) %}
{% endfor %}
{#- vim:ft=sls
-#}

View File

@ -1,27 +0,0 @@
{%- from "cinder/map.jinja" import cinder with context %}
include:
- .db
- .keystone
- .conf
{{ cinder.name }}:
pkg.installed:
- refresh: False
- pkgs: {{ cinder.server_pkgs }}
- require_in:
- file: /etc/cinder/cinder.conf
service.running:
- names: {{ cinder.server_services }}
- enable: True
- require:
- pkg: {{ cinder.name }}
- file: /etc/cinder/cinder.conf
- watch:
- file: /etc/cinder/cinder.conf
{{ cinder.name }}_sync_db:
cmd.run:
- name: cinder-manage db sync
- require:
- file: /etc/cinder/cinder.conf

View File

@ -1,20 +0,0 @@
{%- from "cinder/map.jinja" import cinder with context %}
include:
- .conf
cinder-volume:
pkg.installed:
- refresh: False
- name: {{ cinder.cinder_volume }}
- require_in:
- file: /etc/cinder/cinder.conf
service.running:
- name: {{ cinder.cinder_volume_service }}
- enable: True
- restart: True
- require:
- pkg: cinder-volume
- file: /etc/cinder/cinder.conf
- watch:
- file: /etc/cinder/cinder.conf

View File

@ -1,23 +0,0 @@
cinder:
public_ip: 10.0.0.12
internal_ip: 10.0.0.12
admin_ip: 10.0.0.12
mysql:
ip: 10.0.0.12
password: 'pass'
host: '%'
keystone:
password: 'pass'
email: zhang.lei.fly@gmail.com
host: 10.0.0.12
rabbitmq:
name: openstack
password: pass
ip: 10.0.0.12
config:
DEFAULT:
debug: False
{#- vim:ft=sls
-#}