diff options
66 files changed, 502 insertions, 152 deletions
diff --git a/README.rst b/README.rst index bfb7cd9c6..8892ea001 100644 --- a/README.rst +++ b/README.rst @@ -58,11 +58,13 @@ Kolla provides images to deploy the following OpenStack projects: - `CloudKitty <http://docs.openstack.org/developer/cloudkitty/>`__ - `Congress <http://docs.openstack.org/developer/congress/>`__ - `Designate <http://docs.openstack.org/developer/designate/>`__ +- `Freezer <https://wiki.openstack.org/wiki/Freezer-docs>`__ - `Glance <http://docs.openstack.org/developer/glance/>`__ - `Gnocchi <http://docs.openstack.org/developer/gnocchi/>`__ - `Heat <http://docs.openstack.org/developer/heat/>`__ - `Horizon <http://docs.openstack.org/developer/horizon/>`__ - `Ironic <http://docs.openstack.org/developer/ironic/>`__ +- `Karbor <http://docs.openstack.org/developer/karbor/>`__ - `Keystone <http://docs.openstack.org/developer/keystone/>`__ - `Kuryr <http://docs.openstack.org/developer/kuryr/>`__ - `Magnum <http://docs.openstack.org/developer/magnum/>`__ @@ -71,10 +73,12 @@ Kolla provides images to deploy the following OpenStack projects: - `Murano <http://docs.openstack.org/developer/murano/>`__ - `Neutron <http://docs.openstack.org/developer/neutron/>`__ - `Nova <http://docs.openstack.org/developer/nova/>`__ +- `Panko <http://docs.openstack.org/developer/panko/>`__ - `Rally <http://docs.openstack.org/developer/rally/>`__ - `Sahara <http://docs.openstack.org/developer/sahara/>`__ - `Searchlight <http://docs.openstack.org/developer/searchlight/>`__ - `Senlin <http://docs.openstack.org/developer/senlin/>`__ +- `Solum <http://docs.openstack.org/developer/solum/>`__ - `Swift <http://docs.openstack.org/developer/swift/>`__ - `Tempest <http://docs.openstack.org/developer/tempest/>`__ - `Trove <http://docs.openstack.org/developer/trove/>`__ diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 24772f765..55f468e17 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -108,7 +108,7 @@ storage_interface: "{{ network_interface }}" cluster_interface: "{{ network_interface }}" tunnel_interface: "{{ network_interface }}" bifrost_network_interface: "{{ network_interface }}" - +tunnel_interface_address: "{{ hostvars[inventory_hostname]['ansible_' + tunnel_interface]['ipv4']['address'] }}" # Valid options are [ openvswitch, linuxbridge, sfc ] neutron_plugin_agent: "openvswitch" @@ -254,6 +254,7 @@ enable_ceph_rgw: "no" enable_cinder: "no" enable_cinder_backend_iscsi: "no" enable_cinder_backend_lvm: "no" +enable_cinder_backend_nfs: "no" enable_cloudkitty: "no" enable_congress: "no" enable_etcd: "no" @@ -338,6 +339,7 @@ keystone_admin_url: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keyston keystone_internal_url: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3" keystone_public_url: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ keystone_public_port }}/v3" +# Valid options are [ uuid, fernet ] keystone_token_provider: "uuid" fernet_token_expiry: 86400 diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index d75b3e2fe..17cb24d38 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -33,7 +33,11 @@ control control [telegraf:children] +compute +control monitoring +network +storage [elasticsearch:children] control @@ -240,10 +244,10 @@ manila manila [manila-share:children] -storage +network [manila-data:children] -storage +manila # Swift [swift-proxy-server:children] diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index 9580f6819..fa92b9044 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -51,7 +51,11 @@ monitoring control [telegraf:children] +compute +control monitoring +network +storage [elasticsearch:children] control @@ -255,10 +259,10 @@ manila manila [manila-share:children] -storage +network [manila-data:children] -storage +manila # Swift [swift-proxy-server:children] diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py index 0f2bd44a2..28f752a2e 100644 --- a/ansible/library/kolla_docker.py +++ b/ansible/library/kolla_docker.py @@ -651,7 +651,7 @@ class DockerWorker(object): def generate_module(): argument_spec = dict( common_options=dict(required=False, type='dict', default=dict()), - action=dict(requried=True, type='str', choices=['compare_image', + action=dict(required=True, type='str', choices=['compare_image', 'create_volume', 'get_container_env', 'get_container_state', diff --git a/ansible/roles/baremetal/tasks/install.yml b/ansible/roles/baremetal/tasks/install.yml index f6ee106b1..7538ee100 100644 --- a/ansible/roles/baremetal/tasks/install.yml +++ b/ansible/roles/baremetal/tasks/install.yml @@ -4,6 +4,28 @@ become: True when: ansible_os_family == 'Debian' +- name: Set firewall default policy + ufw: state=disabled policy=allow + when: ansible_os_family == 'Debian' + +- name: Check if firewalld is installed + command: rpm -q firewalld + register: firewalld_check + failed_when: firewalld_check.rc > 1 + when: ansible_os_family == 'RedHat' + +- name: Disable firewalld + become: True + service: + name: "{{ item }}" + enabled: false + state: stopped + with_items: + - firewalld + when: + - ansible_os_family == 'RedHat' + - firewalld_check.rc == 0 + - name: Install apt packages package: name={{item}} state=present become: True diff --git a/ansible/roles/ceilometer/defaults/main.yml b/ansible/roles/ceilometer/defaults/main.yml index e3d015df6..60205fe3e 100644 --- a/ansible/roles/ceilometer/defaults/main.yml +++ b/ansible/roles/ceilometer/defaults/main.yml @@ -7,10 +7,10 @@ project_name: "ceilometer" #################### ceilometer_database_name: "ceilometer" ceilometer_database_user: "ceilometer" -ceilometer_database_port: "{{ mondodb_port if ceilometer_database_type == 'mongodb' else database_port }}" +ceilometer_database_port: "{{ mongodb_port if ceilometer_database_type == 'mongodb' else database_port }}" ceilometer_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ceilometer_database_port }}{% if not loop.last %},{% endif %}{% endfor %}" -ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}:{{ ceilometer_database_port }}" +ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}" #################### diff --git a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 index 1a4515830..726571f28 100644 --- a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 +++ b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 @@ -21,8 +21,8 @@ host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr event_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }} metering_connection = mongodb://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mongodb_address }}/{{ ceilometer_database_name }} {% elif ceilometer_database_type == "mysql" %} -event_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}/{{ ceilometer_database_name }} -metering_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}/{{ ceilometer_database_name }} +event_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }} +metering_connection = mysql+pymysql://{{ ceilometer_database_user }}:{{ ceilometer_database_password }}@{{ ceilometer_database_mysql_address }}:{{ ceilometer_database_port }}/{{ ceilometer_database_name }} {% endif %} [keystone_authtoken] diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index ad948e6a4..757022f02 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -74,5 +74,8 @@ cinder_backends: - name: "lvm-1" driver: "lvm" enabled: "{{ enable_cinder_backend_lvm | bool }}" + - name: "nfs-1" + driver: "nfs" + enabled: "{{ enable_cinder_backend_nfs | bool }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml index 63df28726..49f187946 100644 --- a/ansible/roles/cinder/tasks/config.yml +++ b/ansible/roles/cinder/tasks/config.yml @@ -54,3 +54,15 @@ - "cinder-volume" when: cinder_policy.stat.exists + +- name: Copying over nfs_shares files for cinder_volume + template: + src: "{{ item }}" + dest: "{{ node_config_directory }}/cinder-volume/nfs_shares" + with_first_found: + - files: + - "{{ node_custom_config }}/nfs_shares.j2" + - "{{ node_custom_config }}/cinder/nfs_shares.j2" + - "{{ node_custom_config }}/cinder/cinder-volume/nfs_shares.j2" + - "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/nfs_shares.j2" + skip: "{{ not enable_cinder_backend_nfs | bool }}" diff --git a/ansible/roles/cinder/templates/cinder-volume.json.j2 b/ansible/roles/cinder/templates/cinder-volume.json.j2 index db3891119..5dc729b14 100644 --- a/ansible/roles/cinder/templates/cinder-volume.json.j2 +++ b/ansible/roles/cinder/templates/cinder-volume.json.j2 @@ -6,19 +6,28 @@ "dest": "/etc/cinder/cinder.conf", "owner": "cinder", "perm": "0600" - }{% if cinder_backend_ceph | bool %}, + }, { "source": "{{ container_config_directory }}/ceph.*", "dest": "/etc/ceph/", "owner": "cinder", - "perm": "0700" + "perm": "0700", + "optional": {{ (not cinder_backend_ceph | bool) | string | lower }} }, { "source": "{{ container_config_directory }}/ceph.conf", "dest": "/etc/ceph/ceph.conf", "owner": "cinder", - "perm": "0600" - }{% endif %} + "perm": "0600", + "optional": {{ (not cinder_backend_ceph | bool) | string | lower }} + }, + { + "source": "{{ container_config_directory }}/nfs_shares", + "dest": "/etc/cinder/nfs_shares", + "owner": "cinder", + "perm": "0600", + "optional": {{ (not enable_cinder_backend_nfs | bool) | string | lower }} + } ], "permissions": [ { diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index a34ee75fd..16f07b976 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -99,5 +99,12 @@ rbd_secret_uuid = {{ rbd_secret_uuid }} report_discard_supported = True {% endif %} +{% if enable_cinder_backend_nfs | bool %} +[nfs-1] +volume_driver = cinder.volume.drivers.nfs.NfsDriver +volume_backend_name = nfs-1 +nfs_shares_config = /etc/cinder/nfs_shares +{% endif %} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf diff --git a/ansible/roles/common/templates/cron-logrotate-global.conf.j2 b/ansible/roles/common/templates/cron-logrotate-global.conf.j2 index c21e3d1c0..d74f27c7f 100644 --- a/ansible/roles/common/templates/cron-logrotate-global.conf.j2 +++ b/ansible/roles/common/templates/cron-logrotate-global.conf.j2 @@ -14,7 +14,7 @@ missingok minsize 30M -maxsize 100M +size 100M su root kolla diff --git a/ansible/roles/horizon/defaults/main.yml b/ansible/roles/horizon/defaults/main.yml index 169bfd68b..2658e2fd3 100644 --- a/ansible/roles/horizon/defaults/main.yml +++ b/ansible/roles/horizon/defaults/main.yml @@ -21,6 +21,8 @@ horizon_image_full: "{{ horizon_image }}:{{ horizon_tag }}" #################### openstack_horizon_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}'}" +horizon_logging_debug: "{{ openstack_logging_debug }}" + #################### # Horizon diff --git a/ansible/roles/horizon/tasks/start.yml b/ansible/roles/horizon/tasks/start.yml index e178b92a2..746cae568 100644 --- a/ansible/roles/horizon/tasks/start.yml +++ b/ansible/roles/horizon/tasks/start.yml @@ -5,6 +5,8 @@ common_options: "{{ docker_common_options }}" image: "{{ horizon_image_full }}" name: "horizon" + environment: + ENABLE_NEUTRON_LBAAS: "{{ 'yes' if enable_neutron_lbaas | bool else 'no' }}" volumes: - "{{ node_config_directory }}/horizon/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2 index 891b19441..733e2ab42 100644 --- a/ansible/roles/horizon/templates/local_settings.j2 +++ b/ansible/roles/horizon/templates/local_settings.j2 @@ -7,7 +7,7 @@ from django.utils.translation import ugettext_lazy as _ from openstack_dashboard import exceptions from openstack_dashboard.settings import HORIZON_CONFIG -DEBUG = False +DEBUG = {{ horizon_logging_debug }} TEMPLATE_DEBUG = DEBUG COMPRESS_OFFLINE = True diff --git a/ansible/roles/keystone/templates/keystone.conf.j2 b/ansible/roles/keystone/templates/keystone.conf.j2 index 6f73e98a0..ff33a241f 100644 --- a/ansible/roles/keystone/templates/keystone.conf.j2 +++ b/ansible/roles/keystone/templates/keystone.conf.j2 @@ -20,8 +20,10 @@ domain_specific_drivers_enabled = true domain_config_dir = /etc/keystone/domains {% endif %} -{% if keystone_token_provider == 'fernet' %} [token] +{% if keystone_token_provider == 'uuid' %} +provider = uuid +{% elif keystone_token_provider == 'fernet' %} provider = {{ keystone_token_provider }} expiration = {{ fernet_token_expiry }} diff --git a/ansible/roles/kibana/tasks/start.yml b/ansible/roles/kibana/tasks/start.yml index f58174804..239e892c2 100644 --- a/ansible/roles/kibana/tasks/start.yml +++ b/ansible/roles/kibana/tasks/start.yml @@ -8,3 +8,4 @@ volumes: - "{{ node_config_directory }}/kibana/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" + - "kolla_logs:/var/log/kolla/" diff --git a/ansible/roles/magnum/templates/magnum.conf.j2 b/ansible/roles/magnum/templates/magnum.conf.j2 index 7deb2b1e4..e567d3239 100644 --- a/ansible/roles/magnum/templates/magnum.conf.j2 +++ b/ansible/roles/magnum/templates/magnum.conf.j2 @@ -29,8 +29,8 @@ region_name = {{ openstack_region_name }} [keystone_auth] auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3 -user_domain_id = default -project_domain_id = default +user_domain_name = Default +project_domain_name = Default project_name = service password = {{ magnum_keystone_password }} username = {{ magnum_keystone_user }} @@ -41,8 +41,8 @@ auth_version = v3 auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3 auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} auth_type = password -project_domain_id = default -user_domain_id = default +project_domain_name = Default +user_domain_name = Default project_name = service username = {{ magnum_keystone_user }} password = {{ magnum_keystone_password }} diff --git a/ansible/roles/neutron/templates/ml2_conf.ini.j2 b/ansible/roles/neutron/templates/ml2_conf.ini.j2 index f304d023e..b689440e0 100644 --- a/ansible/roles/neutron/templates/ml2_conf.ini.j2 +++ b/ansible/roles/neutron/templates/ml2_conf.ini.j2 @@ -69,4 +69,4 @@ physical_interface_mappings = physnet1:{{ neutron_external_interface }} [vxlan] l2_population = true {% endif %} -local_ip = {{ api_interface_address }} +local_ip = {{ tunnel_interface_address }} diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2 index d9f625622..024ad09e6 100644 --- a/ansible/roles/neutron/templates/neutron.conf.j2 +++ b/ansible/roles/neutron/templates/neutron.conf.j2 @@ -15,7 +15,7 @@ api_paste_config = /usr/share/neutron/api-paste.ini endpoint_type = internalURL api_workers = {{ openstack_service_workers }} -metadata_works = {{ openstack_service_workers }} +metadata_workers = {{ openstack_service_workers }} # NOTE(SamYaple): We must specify this value here rather than the metadata conf # because it is used by the l3 and dhcp agents. The reason the path has 'kolla' diff --git a/ansible/roles/nova/tasks/start_compute.yml b/ansible/roles/nova/tasks/start_compute.yml index 1ba3c47c8..d40e7a007 100644 --- a/ansible/roles/nova/tasks/start_compute.yml +++ b/ansible/roles/nova/tasks/start_compute.yml @@ -17,6 +17,7 @@ - "kolla_logs:/var/log/kolla/" - "libvirtd:/var/lib/libvirt" - "nova_compute:/var/lib/nova/" + - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - "nova_libvirt_qemu:/etc/libvirt/qemu" register: start_nova_libvirt_container # NOTE(Jeffrey4l): retry 5 to remove nova_libvirt container because when @@ -37,6 +38,7 @@ - "{% if enable_iscsid | bool %}iscsi_info:/etc/iscsi{% endif %}" - "libvirtd:/var/lib/libvirt" - "nova_compute:/var/lib/nova/" + - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - name: Starting nova-compute container kolla_docker: @@ -94,6 +96,7 @@ - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla" - "nova_compute:/var/lib/nova" + - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - "heka_socket:/var/lib/kolla/heka/" # TODO(jeffrey4l): how to handle the nova-compute-fake and # nova-compute-ironic diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 9ed04e591..7aa1e0d67 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -1,4 +1,38 @@ --- +- name: Checking the api_interface is present + fail: "msg='Please check the api_interface property - interface {{ api_interface }} not found'" + when: api_interface not in ansible_interfaces + +- name: Checking the api_interface is active + fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'" + when: hostvars[inventory_hostname]['ansible_' + api_interface]['active'] != True + +- name: Checking the api_interface configuration + fail: "msg='Please check the api_interface settings - interface {{ api_interface }} configuration missing'" + when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4'] is not defined + +- name: Checking the api_interface ip address configuration + fail: "msg='Please check the api_interface settings - interface {{ api_interface }} ip address problem'" + when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] is not defined + +- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node + command: ping -c 3 {{ item }} + register: ping_output + changed_when: false + with_items: + - "{{ kolla_internal_vip_address }}" + - "{{ kolla_external_vip_address }}" + failed_when: ping_output.rc != 1 + when: enable_haproxy | bool + +- name: Checking if kolla_internal_vip_address is in the same network as api_interface on all nodes + command: ip -4 -o addr show dev {{ api_interface }} + register: ip_addr_output + changed_when: false + failed_when: "'169.254.' not in kolla_internal_vip_address and \ + kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none" + when: enable_haproxy | bool + - name: Checking free port for Aodh API wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" @@ -895,37 +929,3 @@ when: - inventory_hostname in groups['haproxy'] - enable_searchlight | bool - -- name: Checking the network_interface is present - fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'" - when: network_interface not in ansible_interfaces - -- name: Checking the network_interface is active - fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'" - when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True - -- name: Checking the network_interface configuration - fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'" - when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined - -- name: Checking the network_interface ip address configuration - fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'" - when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined - -- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node - command: ping -c 3 {{ item }} - register: ping_output - changed_when: false - with_items: - - "{{ kolla_internal_vip_address }}" - - "{{ kolla_external_vip_address }}" - failed_when: ping_output.rc != 1 - when: enable_haproxy | bool - -- name: Checking if kolla_internal_vip_address is in the same network as network_interface on all nodes - command: ip -4 -o addr show dev {{ network_interface }} - register: ip_addr_output - changed_when: false - failed_when: "'169.254.' not in kolla_internal_vip_address and \ - kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none" - when: enable_haproxy | bool diff --git a/doc/bifrost.rst b/doc/bifrost.rst index 7b3c25357..6e44e7e11 100644 --- a/doc/bifrost.rst +++ b/doc/bifrost.rst @@ -261,7 +261,7 @@ Known issues SSH deamon not running ---------------------- By default sshd is installed in the image but may not be enabled. -If you encounter this issue you will have to acess the server phyically in +If you encounter this issue you will have to access the server phyically in recovery mode to enable the ssh service. If your hardware supports it, this can be done remotely with ipmitool and serial over lan. e.g. diff --git a/doc/kuryr-guide.rst b/doc/kuryr-guide.rst index f44697de0..32101bb82 100644 --- a/doc/kuryr-guide.rst +++ b/doc/kuryr-guide.rst @@ -15,13 +15,13 @@ Preparation and Deployment -------------------------- To allow docker daemon connect to the etcd, add the following in the -docker.server file. +docker.service file. :: ExecStart= -H tcp://172.16.1.13:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://172.16.1.13:2379 --cluster-advertise=172.16.1.13:2375 -The IP address is host runnning the etcd service. ```2375``` is port that +The IP address is host running the etcd service. ```2375``` is port that allows Docker daemon to be accessed remotely. ```2379``` is the etcd listening port. diff --git a/doc/manila-hnas-guide.rst b/doc/manila-hnas-guide.rst index b0a9db9cd..2b54146a2 100644 --- a/doc/manila-hnas-guide.rst +++ b/doc/manila-hnas-guide.rst @@ -24,7 +24,7 @@ Requirements - SSC CLI. -Suported shared filesystems and operations +Supported shared filesystems and operations ------------------------------------------ The driver supports CIFS and NFS shares. diff --git a/doc/multinode.rst b/doc/multinode.rst index 46de3f252..6383da9d6 100644 --- a/doc/multinode.rst +++ b/doc/multinode.rst @@ -73,6 +73,7 @@ section: # Ubuntu [Service] + MountFlags=shared EnvironmentFile=-/etc/default/docker ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS diff --git a/doc/production-architecture-guide.rst b/doc/production-architecture-guide.rst index 35a6038be..17a6b7f1e 100644 --- a/doc/production-architecture-guide.rst +++ b/doc/production-architecture-guide.rst @@ -37,12 +37,12 @@ Interface configuration In Kolla operators should configure following network interfaces: -* network_interface - While it is not used on it's own, this provides the +* network_interface - While it is not used on its own, this provides the required default for other interfaces below. * api_interface - This interface is used for the management network. The management network is the network OpenStack services uses to communicate to - each other and the databases. There are know security risks here, so it's + each other and the databases. There are known security risks here, so it's recommended to make this network internal, not accessible from outside. Defaults to network_interface. diff --git a/docker/cinder/cinder-rpcbind/Dockerfile.j2 b/docker/cinder/cinder-rpcbind/Dockerfile.j2 deleted file mode 100644 index 60eb8672b..000000000 --- a/docker/cinder/cinder-rpcbind/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{% block cinder_rpcbind_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} - - {% set cinder_rpcbind_packages = [ - 'nfs-utils', - 'nfs-utils-lib' - ] %} - -{% elif base_distro in ['ubuntu', 'debian'] %} - - {% set cinder_rpcbind_packages = [ - 'rpcbind' - ] %} - -{% endif %} - -{{ macros.install_packages(cinder_rpcbind_packages | customizable("packages")) }} - -{% block cinder_rpcbind_footer %}{% endblock %} -{% block footer %}{% endblock %} -{{ include_footer }} - -USER cinder diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index 11cd55c7b..ef90fcd91 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -8,6 +8,7 @@ MAINTAINER {{ maintainer }} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% set cinder_volume_packages = [ + 'nfs-utils', 'scsi-target-utils' ] %} @@ -35,11 +36,11 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% if base_distro in ['ubuntu', 'debian'] %} {% set cinder_volume_packages = [ - 'cinder-volume' + 'cinder-volume', + 'nfs-common' ] %} {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} - {% endif %} {% endif %} diff --git a/docker/collectd/Dockerfile.j2 b/docker/collectd/Dockerfile.j2 index 532321f9a..ded2fa271 100644 --- a/docker/collectd/Dockerfile.j2 +++ b/docker/collectd/Dockerfile.j2 @@ -8,13 +8,10 @@ MAINTAINER {{ maintainer }} ] %} {{ macros.install_packages(collectd_packages | customizable("packages")) }} -COPY collectd_sudoers /etc/sudoers.d/kolla_collectd_sudoers COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN useradd -r -m collectd \ && chmod 755 /usr/local/bin/kolla_extend_start \ - && chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_collectd_sudoers \ && usermod -a -G kolla collectd \ && chown -R collectd /var/lib/collectd \ && chown -R collectd /etc/collectd* \ diff --git a/docker/collectd/collectd_sudoers b/docker/collectd/collectd_sudoers deleted file mode 100644 index fae410a99..000000000 --- a/docker/collectd/collectd_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /bin/chown collectd\: /var/lib/collectd/, /usr/bin/chown collectd\: /var/lib/collectd/ diff --git a/docker/collectd/extend_start.sh b/docker/collectd/extend_start.sh index 92ff4a5ea..80ef63db3 100644 --- a/docker/collectd/extend_start.sh +++ b/docker/collectd/extend_start.sh @@ -1,6 +1,8 @@ #!/bin/bash -# Only update permissions if permissions need to be updated -if [[ $(stat -c %U:%G /var/lib/collectd) != "collectd:collectd" ]]; then - sudo chown collectd: /var/lib/collectd +if [[ ! -d "/var/log/kolla/collectd" ]]; then + mkdir -p /var/log/kolla/collectd +fi +if [[ $(stat -c %a /var/log/kolla/collectd) != "755" ]]; then + chmod 755 /var/log/kolla/collectd fi diff --git a/docker/designate/designate-central/Dockerfile.j2 b/docker/designate/designate-central/Dockerfile.j2 index 7a29f3569..1edf5bd45 100644 --- a/docker/designate/designate-central/Dockerfile.j2 +++ b/docker/designate/designate-central/Dockerfile.j2 @@ -14,8 +14,8 @@ MAINTAINER {{ maintainer }} {{ macros.install_packages(designate_central_packages | customizable("packages")) }} {% endif %} -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start +COPY extend_start.sh /usr/local/bin/kolla_designate_extend_start +RUN chmod 755 /usr/local/bin/kolla_designate_extend_start {% block designate_central_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index 3c9912cbe..d4a9ab780 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -12,7 +12,8 @@ MAINTAINER {{ maintainer }} 'openstack-dashboard', 'httpd', 'mod_wsgi', - 'gettext' + 'gettext', + 'openstack-neutron-lbaas-ui' ] %} {{ macros.install_packages(horizon_packages | customizable("packages")) }} @@ -26,9 +27,9 @@ RUN useradd --user-group horizon \ && chown -R apache: /usr/share/openstack-dashboard/static \ && sed -i "s|WEBROOT = '/dashboard/'|WEBROOT = '/'|" /etc/openstack-dashboard/local_settings \ && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \ - && /usr/bin/python /usr/bin/manage.py collectstatic --noinput --clear \ && (cd /usr/lib/python2.7/site-packages/horizon && /usr/bin/python /usr/bin/manage.py compilemessages) \ - && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages) + && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages) \ + && rm -f /usr/share/openstack-dashboard/openstack_dashboard/local/enabled/_148*_project*loadbalancersv2_panel.py* {% endblock %} {% elif base_distro in ['ubuntu'] %} @@ -51,7 +52,6 @@ RUN echo > /etc/apache2/ports.conf \ && sed -i "s|WEBROOT='/horizon/'|WEBROOT = '/'|" /etc/openstack-dashboard/local_settings.py \ && sed -i "s|^POLICY_FILES_PATH|POLICY_FILES_PATH = '/etc/openstack-dashboard'|" /etc/openstack-dashboard/local_settings.py \ && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \ - && /usr/bin/python /usr/bin/manage.py collectstatic --noinput \ && rm /etc/apache2/conf-enabled/openstack-dashboard.conf \ && rm /etc/openstack-dashboard/local_settings.py \ && rm /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py \ @@ -107,10 +107,7 @@ RUN ln -s horizon-source/* horizon \ && cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \ && if [ "$(ls /plugins)" ]; then \ pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \ - ln -s `find /plugins -name 'neutron-lbaas-dashboard-*' -type d`/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py \ - /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py; \ fi \ - && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear \ && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/horizon && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \ && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \ && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/kolla/venv/lib/python2.7/site-packages/static diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh index 4db20fd8d..3c618355d 100644 --- a/docker/horizon/extend_start.sh +++ b/docker/horizon/extend_start.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -o errexit + # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # of the KOLLA_BOOTSTRAP variable being set, including empty. if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then @@ -11,6 +13,29 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then exit 0 fi +FORCE_GENERATE="no" + +if [[ ${KOLLA_INSTALL_TYPE} == "binary" ]]; then + SITE_PACKAGES="/usr/lib/python2.7/site-packages" +elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then + SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages" +fi + +function config_neutron_lbaas { + SRC="${SITE_PACKAGES}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py" + DEST="${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py" + if [[ "${ENABLE_NEUTRON_LBAAS}" == "yes" ]] && [[ ! -f ${DEST} ]]; then + cp -a $SRC $DEST + FORCE_GENERATE="yes" + elif [[ "${ENABLE_NEUTRON_LBAAS}" != "yes" ]] && [[ -f ${DEST} ]]; then + # remove pyc pyo files too + rm -f ${DEST} ${DEST}c ${DEST}o + FORCE_GENERATE="yes" + fi +} + +config_neutron_lbaas + # NOTE(pbourke): httpd will not clean up after itself in some cases which # results in the container not being able to restart. (bug #1489676, 1557036) if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then @@ -25,12 +50,14 @@ fi # behavior, so re-generate the compressed javascript and css if it # is changed MD5SUM_TXT_PATH="/tmp/.local_settings.md5sum.txt" -if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $?) != 0 ]]; then +if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $?) != 0 || ${FORCE_GENERATE} == "yes" ]]; then md5sum /etc/openstack-dashboard/local_settings > ${MD5SUM_TXT_PATH} if [[ "${KOLLA_INSTALL_TYPE}" == "binary" ]]; then /usr/bin/manage.py compress --force + /usr/bin/manage.py collectstatic --noinput --clear elif [[ "${KOLLA_INSTALL_TYPE}" == "source" ]]; then /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compress --force + /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear fi fi diff --git a/docker/karbor/karbor-api/Dockerfile.j2 b/docker/karbor/karbor-api/Dockerfile.j2 new file mode 100644 index 000000000..d8bbe7818 --- /dev/null +++ b/docker/karbor/karbor-api/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ image_prefix }}karbor-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block karbor_api_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_karbor_extend_start +RUN chmod 755 /usr/local/bin/kolla_karbor_extend_start + +{% block karbor_api_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER karbor diff --git a/docker/karbor/karbor-api/extend_start.sh b/docker/karbor/karbor-api/extend_start.sh new file mode 100644 index 000000000..c5102072e --- /dev/null +++ b/docker/karbor/karbor-api/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + karbor-manage db sync + exit 0 +fi diff --git a/docker/karbor/karbor-base/Dockerfile.j2 b/docker/karbor/karbor-base/Dockerfile.j2 new file mode 100644 index 000000000..26484070f --- /dev/null +++ b/docker/karbor/karbor-base/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block karbor_base_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + +ADD karbor-base-archive /karbor-base-source +RUN ln -s karbor-base-source/* karbor \ + && useradd --user-group --create-home --home-dir /var/lib/karbor karbor \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /karbor \ + && mkdir -p /etc/karbor \ + && cp -r /karbor/etc/* /etc/karbor/ \ + && chown -R karbor: /etc/karbor + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN usermod -a -G kolla karbor \ + && touch /usr/local/bin/kolla_karbor_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_karbor_extend_start + +{% block karbor_base_footer %}{% endblock %} diff --git a/docker/karbor/karbor-base/extend_start.sh b/docker/karbor/karbor-base/extend_start.sh new file mode 100644 index 000000000..db0fdacc8 --- /dev/null +++ b/docker/karbor/karbor-base/extend_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/karbor" ]]; then + mkdir -p /var/log/kolla/karbor +fi +if [[ $(stat -c %a /var/log/kolla/karbor) != "755" ]]; then + chmod 755 /var/log/kolla/karbor +fi + +. /usr/local/bin/kolla_karbor_extend_start diff --git a/docker/karbor/karbor-operationengine/Dockerfile.j2 b/docker/karbor/karbor-operationengine/Dockerfile.j2 new file mode 100644 index 000000000..745fcd4a8 --- /dev/null +++ b/docker/karbor/karbor-operationengine/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}karbor-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block karbor_operationengine_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +{% block karbor_operationengine_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER karbor diff --git a/docker/karbor/karbor-protection/Dockerfile.j2 b/docker/karbor/karbor-protection/Dockerfile.j2 new file mode 100644 index 000000000..9be5cca0b --- /dev/null +++ b/docker/karbor/karbor-protection/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}karbor-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block karbor_protection_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +{% block karbor_protection_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER karbor diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 index 74a4006ef..8f5b43dbf 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -8,8 +8,6 @@ MAINTAINER {{ maintainer }} {% if install_type == 'binary' %} {% if base_distro in ['centos', 'oraclelinux'] %} {% set magnum_base_packages = ['openstack-magnum-common'] %} - -RUN curl -L https://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean.repo {% elif base_distro in ['ubuntu'] %} {% set magnum_base_packages = ['magnum-common'] %} {% endif %} diff --git a/docker/manila/manila-data/Dockerfile.j2 b/docker/manila/manila-data/Dockerfile.j2 index b1777bfae..ec538dddd 100644 --- a/docker/manila/manila-data/Dockerfile.j2 +++ b/docker/manila/manila-data/Dockerfile.j2 @@ -6,7 +6,7 @@ MAINTAINER {{ maintainer }} {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false diff --git a/docker/mariadb/extend_start.sh b/docker/mariadb/extend_start.sh index d0a42825e..8e6be1a1e 100644 --- a/docker/mariadb/extend_start.sh +++ b/docker/mariadb/extend_start.sh @@ -19,7 +19,7 @@ function bootstrap_db { # NOTE(sbezverk): Currently kolla-kubernetes does not use Galera and disables wsrep driver. # This check will run only for non kolla-kubernetes bootstrap deployments. if [[ ! "${!KOLLA_KUBERNETES[@]}" ]]; then - CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_cluster_status'" | grep Primary) + CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_ready'" | grep ON) TIMEOUT=${DB_MAX_TIMEOUT:-60} while [[ -z "${CLUSTER_READY}" ]]; do if [[ ${TIMEOUT} -gt 0 ]]; then diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2 index 461f8b155..3962ad046 100644 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ b/docker/nova/nova-compute/Dockerfile.j2 @@ -15,6 +15,7 @@ MAINTAINER {{ maintainer }} 'ceph-common', 'genisoimage', 'iscsi-initiator-utils', + 'nfs-utils', 'targetcli', 'python-rtslib' ] %} @@ -32,6 +33,7 @@ MAINTAINER {{ maintainer }} 'ironic-common', 'python-ironicclient', 'genisoimage', + 'nfs-common', 'open-iscsi', 'targetcli', 'python-rtslib' @@ -53,6 +55,7 @@ RUN rm -f /etc/nova/nova-compute.conf 'ceph-common', 'genisoimage', 'iscsi-initiator-utils', + 'nfs-utils', 'targetcli', 'python-rtslib' ] %} @@ -64,6 +67,7 @@ RUN rm -f /etc/nova/nova-compute.conf 'qemu-utils', 'ceph-common', 'genisoimage', + 'nfs-common', 'open-iscsi', 'targetcli', 'python-rtslib' @@ -75,7 +79,12 @@ RUN mkdir -p /etc/ceph {{ macros.install_packages(nova_compute_packages | customizable("packages")) }} -RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt libvirt-python +{% set nova_compute_pip_packages = [ + 'libvirt-python' + ] +%} + +{{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }} {% endif %} diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 99e7db355..4b9f91251 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -200,7 +200,6 @@ ENV DEBIAN_FRONTEND noninteractive 'libxslt-devel', 'libyaml-devel', 'MariaDB-devel', - 'MySQL-python', 'openldap-devel', 'openssl-devel', 'postgresql', @@ -274,6 +273,7 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ 'kombu', 'monotonic', 'msgpack-python', + 'MySQL-python', 'netaddr', 'netifaces', 'os-client-config', diff --git a/docker/panko/panko-api/Dockerfile.j2 b/docker/panko/panko-api/Dockerfile.j2 new file mode 100644 index 000000000..0ef0de233 --- /dev/null +++ b/docker/panko/panko-api/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ image_prefix }}panko-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block panko_api_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set panko_api_packages = ['openstack-panko-api'] %} + {% elif base_distro in ['ubuntu'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{{ macros.install_packages(panko_api_packages | customizable("packages")) }} +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_panko_extend_start +RUN chmod 755 /usr/local/bin/kolla_panko_extend_start + +{% block panko_api_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} diff --git a/docker/panko/panko-api/extend_start.sh b/docker/panko/panko-api/extend_start.sh new file mode 100644 index 000000000..cf3cc3bd4 --- /dev/null +++ b/docker/panko/panko-api/extend_start.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# NOTE(pbourke): httpd will not clean up after itself in some cases which +# results in the container not being able to restart. (bug #1489676, 1557036) +if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then + # Loading Apache2 ENV variables + source /etc/apache2/envvars + rm -rf /var/run/apache2/* +else + rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd* +fi + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + panko-dbsync + exit 0 +fi diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 new file mode 100644 index 000000000..98c95fc74 --- /dev/null +++ b/docker/panko/panko-base/Dockerfile.j2 @@ -0,0 +1,69 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block panko_base_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + + {% set panko_base_packages = [ + 'openstack-panko-common', + 'httpd', + 'mod_wsgi', + 'python-ldappool' + ] %} + +{{ macros.install_packages(panko_base_packages | customizable("packages")) }} +RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif install_type == 'source' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + + {% set panko_base_packages = [ + 'httpd', + 'mod_wsgi', + 'python-ldappool' + ] %} +{{ macros.install_packages(panko_base_packages | customizable("packages")) }} +RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf + + {% elif base_distro in ['ubuntu', 'debian'] %} + + {% set panko_base_packages = [ + 'apache2', + 'libapache2-mod-wsgi', + 'python-ldappool' + ] %} + +{{ macros.install_packages(panko_base_packages | customizable("packages")) }} +RUN truncate -s 0 /etc/apache2/ports.conf + + {% endif %} + +ADD panko-base-archive /panko-base-source + +RUN ln -s panko-base-source/* panko \ + && useradd --user-group panko \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \ + && mkdir -p /etc/panko /home/panko \ + && cp -r /panko/etc/panko/* /etc/panko/ \ + && chown -R panko: /etc/panko /home/panko + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN usermod -a -G kolla panko \ + && mkdir -p /var/lib/panko \ + && chown -R panko: /var/lib/panko \ + && touch /usr/local/bin/kolla_panko_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_panko_extend_start + +{% block panko_base_footer %}{% endblock %} diff --git a/docker/panko/panko-base/extend_start.sh b/docker/panko/panko-base/extend_start.sh new file mode 100644 index 000000000..6d8061ddc --- /dev/null +++ b/docker/panko/panko-base/extend_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/panko" ]]; then + mkdir -p /var/log/kolla/panko +fi +if [[ $(stat -c %a /var/log/kolla/panko) != "755" ]]; then + chmod 755 /var/log/kolla/panko +fi + +. /usr/local/bin/kolla_panko_extend_start diff --git a/docker/trove/trove-api/Dockerfile.j2 b/docker/trove/trove-api/Dockerfile.j2 index 210dffa37..5ac79271a 100644 --- a/docker/trove/trove-api/Dockerfile.j2 +++ b/docker/trove/trove-api/Dockerfile.j2 @@ -16,8 +16,8 @@ MAINTAINER {{ maintainer }} {% endif %} -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start +COPY extend_start.sh /usr/local/bin/kolla_trove_extend_start +RUN chmod 755 /usr/local/bin/kolla_trove_extend_start {% block trove_api_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/trove/trove-base/Dockerfile.j2 b/docker/trove/trove-base/Dockerfile.j2 index a946162dd..6f7bb9447 100644 --- a/docker/trove/trove-base/Dockerfile.j2 +++ b/docker/trove/trove-base/Dockerfile.j2 @@ -22,12 +22,16 @@ RUN ln -s trove-base-source/* trove \ && useradd --user-group trove \ && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /trove \ && mkdir -p /etc/trove /var/log/trove /home/trove \ - && cp -r /trove/etc/* /etc/trove/ \ + && cp -r /trove/etc/trove/* /etc/trove/ \ && chown -R trove: /etc/trove /var/log/trove /home/trove {% endif %} -RUN usermod -a -G kolla trove +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN usermod -a -G kolla trove \ + && touch /usr/local/bin/kolla_trove_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_trove_extend_start {% block trove_base_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/trove/trove-base/extend_start.sh b/docker/trove/trove-base/extend_start.sh new file mode 100644 index 000000000..581a83d7b --- /dev/null +++ b/docker/trove/trove-base/extend_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/trove" ]]; then + mkdir -p /var/log/kolla/trove +fi +if [[ $(stat -c %a /var/log/kolla/trove) != "755" ]]; then + chmod 755 /var/log/kolla/trove +fi + +. /usr/local/bin/kolla_trove_extend_start diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index f5c9f2ada..22dd35a63 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -125,6 +125,7 @@ kolla_internal_vip_address: "10.10.10.254" #enable_cinder: "no" #enable_cinder_backend_iscsi: "no" #enable_cinder_backend_lvm: "no" +#enable_cinder_backend_nfs: "no" #enable_cloudkitty: "no" #enable_congress: "no" #enable_etcd: "no" diff --git a/kolla/common/config.py b/kolla/common/config.py index 5cb64c788..6c7b734df 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -46,10 +46,10 @@ _PROFILE_OPTS = [ help='Main images'), cfg.ListOpt('aux', default=['aodh', 'cloudkitty', 'congress', 'designate', - 'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum', - 'manila', 'mistral', 'murano', 'rally', 'sahara', - 'searchlight', 'senlin', 'solum', 'telegraf', 'trove', - 'zaqar'], + 'freezer', 'gnocchi', 'influxdb', 'ironic', 'karbor', + 'kuryr', 'magnum', 'manila', 'mistral', 'murano', + 'panko', 'rally', 'sahara', 'searchlight', 'senlin', + 'solum', 'telegraf', 'trove', 'zaqar'], help='Aux Images'), cfg.ListOpt('default', default=['chrony', 'cron', 'kolla-toolbox', 'glance', @@ -226,6 +226,10 @@ SOURCES = { 'type': 'url', 'location': ('http://tarballs.openstack.org/ironic-inspector/' 'ironic-inspector-master.tar.gz')}, + 'karbor-base': { + 'type': 'url', + 'location': ('http://tarballs.openstack.org/karbor/' + 'karbor-master.tar.gz')}, 'keystone-base': { 'type': 'url', 'location': ('http://tarballs.openstack.org/keystone/' @@ -282,6 +286,10 @@ SOURCES = { 'type': 'url', 'location': ('http://github.com/kanaka/noVNC/tarball/' 'v0.5.1')}, + 'panko-base': { + 'type': 'url', + 'location': ('http://tarballs.openstack.org/panko/' + 'panko-master.tar.gz')}, 'rally': { 'type': 'url', 'location': ('http://tarballs.openstack.org/rally/' diff --git a/kolla/image/build.py b/kolla/image/build.py index 0e2b87244..4c4c9f643 100644 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -691,8 +691,12 @@ class KollaWorker(object): with open(self.include_footer, 'r') as f: values['include_footer'] = f.read() content = template.render(values) - with open(os.path.join(path, 'Dockerfile'), 'w') as f: + content_path = os.path.join(path, 'Dockerfile') + with open(content_path, 'w') as f: + LOG.debug("Rendered %s into:", tpl_path) + LOG.debug(content) f.write(content) + LOG.debug("Wrote it to %s", content_path) def find_dockerfiles(self): """Recursive search for Dockerfiles in the working directory""" @@ -812,6 +816,9 @@ class KollaWorker(object): installation['reference'] = self.conf[section]['reference'] return installation + all_sections = (set(six.iterkeys(self.conf._groups)) | + set(self.conf.list_all_sections())) + for path in self.docker_build_paths: # Reading parent image name with open(os.path.join(path, 'Dockerfile')) as f: @@ -834,7 +841,7 @@ class KollaWorker(object): for plugin in [match.group(0) for match in (re.search('^{}-plugin-.+'.format(image.name), section) for section in - self.conf.list_all_sections()) if match]: + all_sections) if match]: try: self.conf.register_opts( common_config.get_source_opts(), @@ -923,6 +930,11 @@ class KollaWorker(object): queue = six.moves.queue.Queue() for image in self.images: + if image.status == STATUS_UNMATCHED: + # Don't bother queuing up build tasks for things that + # were not matched in the first place... (not worth the + # effort to run them, if they won't be used anyway). + continue if image.parent is None: queue.put(BuildTask(self.conf, image, push_queue)) LOG.info('Added image %s to queue', image.name) diff --git a/releasenotes/notes/add-karbor-e6cfd97f965a4a9f.yaml b/releasenotes/notes/add-karbor-e6cfd97f965a4a9f.yaml new file mode 100644 index 000000000..1c24f66f6 --- /dev/null +++ b/releasenotes/notes/add-karbor-e6cfd97f965a4a9f.yaml @@ -0,0 +1,5 @@ +--- +features: + - Add Karbor Dockerfile , Karbor is an OpenStack project + that provides a pluggable framework for protecting and + restoring Data and Metadata. diff --git a/releasenotes/notes/add-panko-dockerfile-ff69a745aca3ec15.yaml b/releasenotes/notes/add-panko-dockerfile-ff69a745aca3ec15.yaml new file mode 100644 index 000000000..f02b45e19 --- /dev/null +++ b/releasenotes/notes/add-panko-dockerfile-ff69a745aca3ec15.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add Panko dockerfile, Panko is a component of the Telemetry project diff --git a/releasenotes/notes/move-manila-share-to-network-node-57c61e757c5b96b2.yaml b/releasenotes/notes/move-manila-share-to-network-node-57c61e757c5b96b2.yaml new file mode 100644 index 000000000..ffee6db92 --- /dev/null +++ b/releasenotes/notes/move-manila-share-to-network-node-57c61e757c5b96b2.yaml @@ -0,0 +1,7 @@ +--- +prelude: > + - Move manila-share service to network node. +upgrade: + - Is required that for the generic driver the manila-share + service should be run on the network node. + The generic driver is our default driver, so this change is needed. diff --git a/requirements.txt b/requirements.txt index 4de6ed5dc..bd0a71f3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=1.6 # Apache-2.0 +pbr>=1.8 # Apache-2.0 docker-py<1.8.0,>=1.6.0 # Apache-2.0 Jinja2>=2.8 # BSD License (3 clause) gitdb>=0.6.4 # BSD License (3 clause) diff --git a/tests/test_build.py b/tests/test_build.py index 431137c7d..c786cf9b0 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -65,7 +65,8 @@ class BuildTest(object): class BuildTestCentosBinary(BuildTest, base.BaseTestCase): - excluded_images = ["kuryr-base", + excluded_images = ["karbor-base", + "kuryr-base", "neutron-sfc-agent", "searchlight-base", "senlin-base", @@ -94,7 +95,8 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase): class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase): - excluded_images = ["kuryr-base", + excluded_images = ["karbor-base", + "kuryr-base", "neutron-sfc-agent", "searchlight-base", "senlin-base", @@ -105,7 +107,8 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase): "congress-base", "bifrost-base", "cloudkitty-base", - "freezer-base"] + "freezer-base", + "panko-base"] def setUp(self): super(BuildTestUbuntuBinary, self).setUp() @@ -123,7 +126,8 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase): class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase): - excluded_images = ["kuryr-base", + excluded_images = ["karbor-base", + "kuryr-base", "neutron-sfc-agent", "searchlight-base", "senlin-base", diff --git a/tests/test_kolla_docker.py b/tests/test_kolla_docker.py index 7e9b97650..efcf16c0d 100644 --- a/tests/test_kolla_docker.py +++ b/tests/test_kolla_docker.py @@ -43,7 +43,7 @@ class ModuleArgsTest(base.BaseTestCase): argument_spec = dict( common_options=dict(required=False, type='dict', default=dict()), action=dict( - requried=True, type='str', choices=['compare_image', + required=True, type='str', choices=['compare_image', 'create_volume', 'get_container_env', 'get_container_state', diff --git a/tools/deploy_aio.sh b/tools/deploy_aio.sh index 1ae96d78f..d536171a9 100755 --- a/tools/deploy_aio.sh +++ b/tools/deploy_aio.sh @@ -77,6 +77,7 @@ neutron_external_interface: "fake_interface" enable_horizon: "no" enable_heat: "no" openstack_logging_debug: "True" +openstack_service_workers: "1" EOF mkdir /etc/kolla/config/nova @@ -84,25 +85,6 @@ EOF [libvirt] virt_type=qemu EOF - - cat << EOF > /etc/kolla/config/nova.conf -[DEFAULT] -osapi_compute_workers = 1 - -[conductor] -workers = 1 -EOF - - cat << EOF > /etc/kolla/config/glance.conf -[DEFAULT] -workers = 1 -EOF - - cat << EOF > /etc/kolla/config/neutron.conf -[DEFAULT] -api_workers = 1 -metadata_workers = 1 -EOF } trap check_failure EXIT diff --git a/tools/init-runonce b/tools/init-runonce index 7fb50f738..013d2f001 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -71,6 +71,10 @@ else neutron security-group-rule-create default --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 8080 --port-range-max 8080 --remote-ip-prefix 0.0.0.0/0 fi +if [ ! -f ~/.ssh/id_rsa.pub ]; then + echo Generating ssh key. + ssh-keygen -t rsa -f ~/.ssh/id_rsa +fi if [ -r ~/.ssh/id_rsa.pub ]; then echo Configuring nova public key and quotas. nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey @@ -209,6 +209,14 @@ commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +[testenv:bindep] +# Do not install any requirements. We want this to be fast and work even if +# system dependencies are missing, since it's used to tell you what system +# dependencies are missing! This also means that bindep must be installed +# separately, outside of the requirements files. +deps = bindep +commands = bindep test + [flake8] show-source = True exclude=.eggs,.git,.tox,doc |
