Fully working Cinder. Needs hiera integration, coming next commit.
This commit is contained in:
parent
908874894f
commit
e83e632910
|
@ -3,6 +3,9 @@ kube_context: "kubernetes-admin@kubernetes"
|
|||
config_file: "~/.kube/config"
|
||||
action: provision
|
||||
namespace: openstack
|
||||
service_account: openstack
|
||||
database_password: weakpassword
|
||||
cinder_db_password: cinderpass
|
||||
|
||||
hiera_data: {}
|
||||
hiera_data_file: ''
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
- name: Delete cinder-create-db job
|
||||
k8s_v1_job:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-create-db
|
||||
namespace: "{{ namespace }}"
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder db-sync job
|
||||
k8s_v1_job:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-create-tables
|
||||
namespace: "{{ namespace }}"
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder db-sync job
|
||||
k8s_v1_job:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-create-user
|
||||
namespace: "{{ namespace }}"
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder-api deployment
|
||||
k8s_v1beta1_deployment:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-api
|
||||
namespace: openstack
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder-scheduler deployment
|
||||
k8s_v1beta1_deployment:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-scheduler
|
||||
namespace: openstack
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder-volume deployment
|
||||
k8s_v1beta1_deployment:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-volume
|
||||
namespace: openstack
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder service
|
||||
k8s_v1_service:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder
|
||||
namespace: openstack
|
||||
state: absent
|
||||
|
||||
- name: Delete cinder configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-volume
|
||||
namespace: openstack
|
||||
state: absent
|
||||
- name: Delete cinder configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-scheduler
|
||||
namespace: openstack
|
||||
state: absent
|
||||
- name: Delete cinder configmaps
|
||||
ignore_errors: yes
|
||||
k8s_v1_config_map:
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
name: cinder-api
|
||||
namespace: openstack
|
||||
state: absent
|
||||
debug: yes
|
|
@ -5,84 +5,12 @@
|
|||
hieradata: '{{hiera_data}}'
|
||||
hieradata_file: '{{hiera_data_file}}'
|
||||
schema:
|
||||
glance_log_file: DEFAULT.log_file
|
||||
glance::api::debug: DEFAULT.debug
|
||||
glance::api::workers: DEFAULT.workers
|
||||
cinder::api::bind_port: 0.0.0.0
|
||||
cinder::api::bind_port: DEFAULT.bind_port
|
||||
glance::api::enable_v1_api: DEFAULT.enable_v1_api
|
||||
glance::api::enable_v2_api: DEFAULT.enable_v2_api
|
||||
glance::api::show_image_direct_url: DEFAULT.show_image_direct_url
|
||||
glance::api::show_multiple_locations: DEFAULT.show_multiple_locations
|
||||
|
||||
glance::api::authtoken::auth_uri: keystone_authtoken.auth_uri
|
||||
glance::api::authtoken::auth_url: keystone_authtoken.auth_url
|
||||
glance::api::authtoken::password: keystone_authtoken.password
|
||||
glance::api::authtoken::username: keystone_authtoken.username
|
||||
glance::api::authtoken::project: keystone_authtoken.project
|
||||
glance::api::os_region_name: glance_store.os_region_name
|
||||
|
||||
glance::api::enable_proxy_headers_parsing: oslo_middleware.enable_proxy_headers_parsing
|
||||
|
||||
glance::api::pipeline: paste_deploy.pipeline
|
||||
cinder::notify::rabbitmq::rabbit_userid: oslo_messaging_rabbit.rabbit_userid
|
||||
cinder::notify::rabbitmq::rabbit_port: oslo_messaging_rabbit.rabbit_port
|
||||
cinder::notify::rabbitmq::rabbit_password: oslo_messaging_rabbit.rabbit_password
|
||||
cinder::notify::rabbitmq::rabbit_use_ssl: oslo_messaging_rabbit.rabbit_use_ssl
|
||||
cinder::notify::rabbitmq::rabbit_host: oslo_messaging_rabbit.rabbit_host
|
||||
cinder::notify::rabbitmq::notification_driver: {get_param: NotificationDriver}
|
||||
glance::notification_driver: oslo_messaging_notifications.driver
|
||||
glance::notification_topics: oslo_messaging_notifications.topics
|
||||
|
||||
|
||||
|
||||
cinder::api::bind_host": "%{hiera('fqdn_internal_api')}",
|
||||
cinder::api::enable_proxy_headers_parsing": true,
|
||||
cinder::api::nova_catalog_admin_info": "compute:nova:adminURL",
|
||||
cinder::api::nova_catalog_info": "compute:nova:internalURL",
|
||||
cinder::api::service_name": "httpd",
|
||||
"cinder::ceilometer::notification_driver": "messagingv2",
|
||||
"cinder::config": {
|
||||
"DEFAULT/swift_catalog_info": {
|
||||
"value": "object-store:swift:internalURL"
|
||||
}
|
||||
},
|
||||
"cinder::cron::db_purge::age": "0",
|
||||
"cinder::cron::db_purge::destination": "/var/log/cinder/cinder-rowsflush.log",
|
||||
"cinder::cron::db_purge::hour": "0",
|
||||
"cinder::cron::db_purge::minute": "1",
|
||||
"cinder::cron::db_purge::month": "*",
|
||||
"cinder::cron::db_purge::monthday": "*",
|
||||
"cinder::cron::db_purge::user": "keystone",
|
||||
"cinder::cron::db_purge::weekday": "*",
|
||||
"cinder::database_connection": "mysql+pymysql://cinder:wafF9ny97Z4ANQMegheBbdxDc@192.168.122.120/cinder?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf",
|
||||
"cinder::db::database_db_max_retries": -1,
|
||||
"cinder::db::database_max_retries": -1,
|
||||
"cinder::db::mysql::allowed_hosts": [
|
||||
"%",
|
||||
"%{hiera('mysql_bind_host')}"
|
||||
],
|
||||
"cinder::db::mysql::dbname": "cinder",
|
||||
"cinder::db::mysql::host": "192.168.122.120",
|
||||
"cinder::db::mysql::password": "wafF9ny97Z4ANQMegheBbdxDc",
|
||||
"cinder::db::mysql::user": "cinder",
|
||||
"cinder::debug": "",
|
||||
"cinder::glance::glance_api_servers": "http://192.168.122.120:9292",
|
||||
"cinder::keystone::authtoken::auth_uri": "http://192.168.122.120:5000",
|
||||
"cinder::keystone::authtoken::auth_url": "http://192.168.122.120:5000",
|
||||
"cinder::keystone::authtoken::password": "wafF9ny97Z4ANQMegheBbdxDc",
|
||||
"cinder::keystone::authtoken::project_domain_name": "Default",
|
||||
"cinder::keystone::authtoken::project_name": "service",
|
||||
"cinder::keystone::authtoken::user_domain_name": "Default",
|
||||
"cinder::policy::policies": {},
|
||||
"cinder::rabbit_heartbeat_timeout_threshold": 60,
|
||||
"cinder::rabbit_password": "3H8Zm93p6Z6qghxPMJ7yBsDtc",
|
||||
"cinder::rabbit_port": 5672,
|
||||
"cinder::rabbit_use_ssl": "False",
|
||||
"cinder::rabbit_userid": "guest",
|
||||
"cinder::scheduler::scheduler_driver": "cinder.scheduler.filter_scheduler.FilterScheduler",
|
||||
"cinder::wsgi::apache::bind_host": "192.168.122.120",
|
||||
"cinder::wsgi::apache::servername": "%{hiera('fqdn_internal_api')}",
|
||||
"cinder::wsgi::apache::ssl": false,
|
||||
"cinder::wsgi::apache::workers": "%{::os_workers}",
|
||||
|
||||
cinder::rabbit_userid: cinder_rabbit_user
|
||||
cinder::rabbit_password: cinder_rabbit_password
|
||||
cinder::rabbit_port: cinder_rabbit_port
|
||||
|
|
|
@ -166,6 +166,7 @@
|
|||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: "{{ service_account }}"
|
||||
restart_policy: OnFailure
|
||||
containers:
|
||||
- name: cinder-create-db
|
||||
|
@ -181,9 +182,10 @@
|
|||
name='cinder'"
|
||||
env:
|
||||
- name: DATABASE_PASSWORD
|
||||
value: "mysqlpass"
|
||||
value: "{{ database_password }}"
|
||||
- name: "TZ"
|
||||
value: "UTC"
|
||||
register: result
|
||||
|
||||
- name: Create Cinder User in the database
|
||||
k8s_v1_job:
|
||||
|
@ -192,6 +194,7 @@
|
|||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: "{{ service_account }}"
|
||||
restart_policy: OnFailure
|
||||
containers:
|
||||
- name: cinder-create-db
|
||||
|
@ -211,29 +214,35 @@
|
|||
append_privs='yes'"
|
||||
env:
|
||||
- name: CINDER_DATABASE_PASSWORD
|
||||
value: "cinderpass"
|
||||
value: "{{ cinder_db_password }}"
|
||||
- name: DATABASE_PASSWORD
|
||||
value: "mysqlpass"
|
||||
value: "{{database_password}}"
|
||||
- name: "TZ"
|
||||
value: "UTC"
|
||||
when: result|succeeded
|
||||
|
||||
# Cinder Scheduler won't start without cinder tables present
|
||||
- name: Create Cinder Tables
|
||||
k8s_v1_job:
|
||||
name: cinder-create-db
|
||||
name: cinder-create-tables
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: "{{ service_account }}"
|
||||
restart_policy: OnFailure
|
||||
containers:
|
||||
- name: cinder-create-db
|
||||
image: tripleoupstream/centos-binary-cinder-api:latest
|
||||
image_pull_policy: IfNotPresent
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- cinder-manage db sync
|
||||
# command: ["/usr/bin/cinder-manage", "db", "sync"]
|
||||
env:
|
||||
- name: KOLLA_KUBERNETES
|
||||
value: ""
|
||||
- name: KOLLA_BOOTSTRAP
|
||||
value: ""
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: "COPY_ONCE"
|
||||
- name: "TZ"
|
||||
value: "UTC"
|
||||
volume_mounts:
|
||||
|
@ -242,11 +251,12 @@
|
|||
volumes:
|
||||
- name: kolla-config
|
||||
config_map:
|
||||
name: cinder-scheduler
|
||||
name: cinder-api
|
||||
when: result|succeeded
|
||||
|
||||
- name: create cinder-api service
|
||||
k8s_v1_service:
|
||||
name: cinder-api
|
||||
name: cinder
|
||||
host: "{{coe_host}}"
|
||||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
|
@ -270,6 +280,7 @@
|
|||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: "{{ service_account }}"
|
||||
labels:
|
||||
app: cinder-api
|
||||
service: cinder-api
|
||||
|
@ -278,9 +289,8 @@
|
|||
app: cinder-api
|
||||
service: cinder-api
|
||||
containers:
|
||||
- env:
|
||||
- name: cinder-api
|
||||
image: tripleoupstream/centos-binary-cinder-api:latest
|
||||
name: cinder-api
|
||||
ports:
|
||||
- container_port: 8776
|
||||
protocol: TCP
|
||||
|
@ -307,6 +317,7 @@
|
|||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: "{{ service_account }}"
|
||||
labels:
|
||||
app: cinder-scheduler
|
||||
service: cinder-scheduler
|
||||
|
@ -315,8 +326,8 @@
|
|||
app: cinder-scheduler
|
||||
service: cinder-scheduler
|
||||
containers:
|
||||
- image: tripleoupstream/centos-binary-cinder-scheduler:latest
|
||||
name: cinder-scheduler
|
||||
- name: cinder-scheduler
|
||||
image: tripleoupstream/centos-binary-cinder-scheduler:latest
|
||||
env:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
|
@ -339,7 +350,7 @@
|
|||
context: "{{kube_context}}"
|
||||
kubeconfig: "{{config_file}}"
|
||||
namespace: "{{ namespace }}"
|
||||
service_account_name: openstack
|
||||
service_account_name: "{{ service_account }}"
|
||||
labels:
|
||||
app: cinder-volume
|
||||
service: cinder-volume
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
Listen 0.0.0.0:8776
|
||||
Listen 0.0.0.0:8776
|
||||
|
||||
TraceEnable off
|
||||
TraceEnable off
|
||||
|
||||
<VirtualHost *:8776>
|
||||
WSGIDaemonProcess cinder-api processes=5 threads=1 user=cinder group=cinder display-name=%{GROUP} python-path=/usr/lib/python2.7/site-packages
|
||||
WSGIProcessGroup cinder-api
|
||||
WSGIScriptAlias / /var/www/cgi-bin/cinder/cinder-wsgi
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%{cu}t %M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/kolla/cinder/cinder-api.log
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat
|
||||
</VirtualHost>
|
||||
<VirtualHost *:8776>
|
||||
WSGIDaemonProcess cinder-api processes=5 threads=1 user=cinder group=cinder display-name=%{GROUP} python-path=/usr/lib/python2.7/site-packages
|
||||
WSGIProcessGroup cinder-api
|
||||
WSGIScriptAlias / /var/www/cgi-bin/cinder/cinder-wsgi
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%{cu}t %M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/kolla/cinder/cinder-api.log
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
|
||||
CustomLog /var/log/kolla/cinder/cinder-api-access.log logformat
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1,53 +1,52 @@
|
|||
cinder.conf: |
|
||||
[DEFAULT]
|
||||
glance_api_servers=none
|
||||
glance_api_version=2
|
||||
enable_v3_api=True
|
||||
storage_availability_zone=nova
|
||||
default_availability_zone=nova
|
||||
auth_strategy=noauth
|
||||
enabled_backends=tripleo_iscsi
|
||||
nova_catalog_info=compute:nova:internalURL
|
||||
nova_catalog_admin_info=compute:nova:adminURL
|
||||
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler
|
||||
osapi_volume_listen=0.0.0.0
|
||||
osapi_volume_workers=2
|
||||
log_dir=/var/log/cinder
|
||||
transport_url=rabbit://guest:rabbit_weakpassword@rabbitmq:5672/?ssl=0
|
||||
rpc_backend=rabbit
|
||||
control_exchange=openstack
|
||||
api_paste_config=/etc/cinder/api-paste.ini
|
||||
[DEFAULT]
|
||||
glance_api_servers=none
|
||||
glance_api_version=2
|
||||
enable_v3_api=True
|
||||
storage_availability_zone=nova
|
||||
default_availability_zone=nova
|
||||
auth_strategy=noauth
|
||||
enabled_backends=tripleo_iscsi
|
||||
nova_catalog_info=compute:nova:internalURL
|
||||
nova_catalog_admin_info=compute:nova:adminURL
|
||||
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler
|
||||
osapi_volume_listen=0.0.0.0
|
||||
osapi_volume_workers=2
|
||||
log_dir=/var/log/cinder
|
||||
transport_url=rabbit://guest:rabbitpass@rabbitmq:5672/?ssl=0
|
||||
rpc_backend=rabbit
|
||||
control_exchange=openstack
|
||||
api_paste_config=/etc/cinder/api-paste.ini
|
||||
|
||||
[database]
|
||||
connection=mysql+pymysql://cinder:cinderpass@mariadb:3306/cinder
|
||||
max_retries=-1
|
||||
db_max_retries=-1
|
||||
[database]
|
||||
connection=mysql+pymysql://cinder:cinderpass@mariadb:3306/cinder
|
||||
max_retries=-1
|
||||
db_max_retries=-1
|
||||
|
||||
[oslo_concurrency]
|
||||
lock_path=/var/lib/cinder/tmp
|
||||
[oslo_concurrency]
|
||||
lock_path=/var/lib/cinder/tmp
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
driver=messagingv2
|
||||
transport_url=rabbit://guest:rabbit_weakpassword@rabbitmq:5672/?ssl=0
|
||||
[oslo_messaging_notifications]
|
||||
driver=messagingv2
|
||||
transport_url=rabbit://guest:rabbitpass@rabbitmq:5672/?ssl=0
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
ssl=False
|
||||
rabbit_port=5672
|
||||
rabbit_userid=guest
|
||||
rabbit_password=rabbit_weakpassword
|
||||
heartbeat_timeout_threshold=60
|
||||
[oslo_messaging_rabbit]
|
||||
ssl=False
|
||||
rabbit_port=5672
|
||||
rabbit_userid=guest
|
||||
rabbit_password=rabbitpass
|
||||
heartbeat_timeout_threshold=60
|
||||
|
||||
[oslo_middleware]
|
||||
enable_proxy_headers_parsing=True
|
||||
[oslo_middleware]
|
||||
enable_proxy_headers_parsing=True
|
||||
|
||||
[oslo_policy]
|
||||
policy_file=/etc/cinder/policy.json
|
||||
[oslo_policy]
|
||||
policy_file=/etc/cinder/policy.json
|
||||
|
||||
[tripleo_iscsi]
|
||||
volume_backend_name=tripleo_iscsi
|
||||
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||
iscsi_ip_address=iscsid
|
||||
iscsi_helper=lioadm
|
||||
volumes_dir=/var/lib/cinder/cinder-volumes
|
||||
iscsi_protocol=iscsi
|
||||
[tripleo_iscsi]
|
||||
volume_backend_name=tripleo_iscsi
|
||||
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||
iscsi_ip_address=iscsid
|
||||
iscsi_helper=lioadm
|
||||
volumes_dir=/var/lib/cinder/cinder-volumes
|
||||
iscsi_protocol=iscsi
|
||||
|
||||
|
|
Loading…
Reference in New Issue