====== Devstack ====== * Edit local.conf * Remove /opt/stack (default installation dir) for clean setup. * Run ./stack.sh twice on error === local.conf === [[local|localrc]] ADMIN_PASSWORD=openstack DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD DEST=/opt/stack #default #IPV4_ADDRS_SAFE_TO_USE=172.31.1.0/24 ##FLOATING_RANGE=192.168.20.0/25 HOST_IP=192.168.56.102 <---------------- update this to ext ip # Force systemd-based service deployment USE_SCREEN=False USE_SYSTEMD=True # Git fine tuning. HTTPS is usually enabled on firewalls. # Depth should be only one for upstream training purposes #GIT_DEPTH=1 GIT_BASE=https://git.openstack.org # Let's save some memory API_WORKERS=1 ### SET SOME INSTALL OPTIONS ### GFILE=$DEST/logs/stack.sh.log VERBOSE=TRUE # This line will be uncommented at the end of devstack setup so that starting up # the VM again would not require high network bandwith to check and install # packages. # run already-installed devstack in offline mode # Set ``OFFLINE`` to ``True`` to configure ``stack.sh`` to run cleanly without # Internet access. ``stack.sh`` must have been previously run with Internet # access to install prerequisites and fetch repositories. #OFFLINE=True GIT_BASE=${GIT_BASE:-https://git.openstack.org} # Reclone will ensure any repos already present are not re-cloned # # To review a patch to devstack itself, set this to yes, then: # cd /opt/stack/searchlight # git review -d # /unstack.sh # /stack.sh RECLONE=no <----------------- check this # always upgrade all Python dependencies PIP_UPGRADE=False # Set libraries that will be installed from git and not PyPI # e.g. python-searchlightclient (not yet supported) #LIBS_FROM_GIT=python-searchlightclient ### ADD SOME IMAGES TO GLANCE ### # DOWNLOAD_DEFAULT_IMAGES=False # latest cirros qcow2 image instead of UEC ones IMAGE_URLS+=",http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img" # latest Ubuntu Xenial amd64 cloud image IMAGE_URLS+=",https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img" # Fedora 21 cloud image (e.g. for AWS LoadBalancer resource in Heat) #IMAGE_URLS+=",http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64/Fedora-Cloud-Base-20141203-21.x86_64.qcow2" # ElasticSearch version # Currently, only ElasticSearch 2.x and 5.x are supported ELASTICSEARCH_VERSION=5.6.11 ### CONFIGURE INSTALLED SERVICES ### # # Default set of components installed (as of DevStack Juno) is: # - Nova with Nova-network # - Keystone # - Glance # - Cinder with LVM backend # - Horizon # The below changes it. ### HEAT ### # # enable Heat services enable_service h-eng h-api h-api-cfn h-api-cw heat # (ON REVIEW) Install image for Heat's integration tests HEAT_TEST_IMAGE=True ### CINDER ### # # Do not securely rewrite cinder volumes on delete #CINDER_SECURE_DELETE=False ### HORIZON ### # # disable Horizon (Dashboard) #disable_service horizon HORIZON_BRANCH=master ### NEUTRON ### # # disable Nova-network and enable Neutron disable_service n-net enable_service q-svc q-agt q-dhcp q-l3 q-meta q-metering q-lbaas q-fwaas neutron ### CEILOMETER ### # # metering services #enable_service ceilometer-acompute ceilometer-acentral ceilometer-anotification ceilometer-collector # alarming services #enable_service ceilometer-alarm-evaluator,ceilometer-alarm-notifier # api services # enable_service ceilometer-api # set shorter sample collection interval (default is 600) #CEILOMETER_PIPELINE_INTERVAL=60 ### SWIFT ### # enable_service s-proxy s-object s-container s-account # set swift hash - the hash below is result of # echo "SWIFT_HASH" | md5sum | awk '{print $1}' SWIFT_HASH=096d08da4f8d4cce3a724c5f6c18f055 SWIFT_REPLICAS=1 SWIFT_DATA_DIR=$DEST/data/swift ### DESIGNATE ### # enable_plugin designate https://git.openstack.org/openstack/designate # Searchlight # enable_plugin searchlight https://git.openstack.org/openstack/searchlight enable_service searchlight-api enable_service searchlight-listener enable_plugin searchlight-ui https://git.openstack.org/openstack/searchlight-ui ### POST CONFIG STAGE SETTINGS ### # # fix to allow access to instance vnc console when accessing Horizon via tunnel [[post-config|$NOVA_CONF]] [DEFAULT] #novncproxy_base_url = http://172.18.200.23:6127/vnc_auto.html [notifications] notify_on_state_change = vm_and_task_state [oslo_messaging_notifications] driver = messagingv2 [[post-config|$NEUTRON_CONF]] [oslo_messaging_notifications] driver = messagingv2 # decrease number of Heat engine workers, when too much for devstack [[post-config|$HEAT_CONF]] [DEFAULT] num_engine_workers = 2 [[post-config|$GLANCE_API_CONF]] [oslo_messaging_notifications] driver = messagingv2 [[post-config|$CINDER_CONF]] [oslo_messaging_notifications] driver = messagingv2 [[post-config|$DESIGNATE_CONF]] [oslo_messaging_notifications] driver = messagingv2 ### Searchlight Configuration ### [[post-config|$SEARCHLIGHT_CONF]] [elasticsearch] index_settings = number_of_shards:1,number_of_replicas:0 [manage] #workers = 3 [listener] #notifications_pool = searchlight-listener [resource_plugin] #notifications_topic = notifications #resource_group_name = searchlight [service_credentials:nova] compute_api_version = 2.1 [resource_plugin:os_nova_server] enabled = True #admin_only_fields = OS-EXT-STS:vm_state [resource_plugin:os_nova_hypervisor] enabled = True [resource_plugin:os_nova_flavor] notifications_topics_exchanges = versioned_notifications,nova enabled = True [resource_plugin:os_nova_servergroup] enabled = True [resource_plugin:os_glance_image] enabled = True [resource_plugin:os_glance_metadef] enabled = True [resource_plugin:os_cinder_volume] enabled = True [resource_plugin:os_cinder_snapshot] enabled = True [resource_plugin:os_designate_zone] enabled = True [resource_plugin:os_designate_recordset] enabled = True [resource_plugin:os_neutron_net] enabled = True [resource_plugin:os_neutron_port] enabled = True [resource_plugin:os_neutron_floatingip] enabled = True [resource_plugin:os_neutron_security_group] enabled = True ## SWIFT SETTINGS ### # At this time we recommend that you manually enable the Searchlight plugins # for Swift after devstack has completed stacking. Please follow the # instructions in the docs: # # https://docs.openstack.org/searchlight/latest/admin/plugins/swift.html # # Notifications must be configured properly for searchlight to process # incremental updates. There is a middleware patch to provide Swift updates. # Please see the plugin guide for swift for more information. [resource_plugin:os_swift_account] enabled = False #Specify same value as in swift proxy config for reseller_prefix reseller_prefix = AUTH_ [resource_plugin:os_swift_container] enabled = False [resource_plugin:os_swift_object] enabled = False ===== Devstack for dev ===== * https://www.sebastien-han.fr/blog/2013/08/08/devstack-in-1-minute/ * admin admin is correct! not devstack * ===== Troubleshooting ===== ==== - *-api did not start ==== * Maybe slow server, timedout: https://ask.openstack.org/en/question/114408/g-api-did-not-start-while-running-stacksh/ * increase SERVICE_TIMEOUT in devstack/stackrc ==== - Host is not mapped to any cell ==== source devstack/openrc admin admin nova-manage cell_v2 discover_hosts --verbose Alternatively, you can set an appropriate interval in ``/etc/nova/nova.conf``: [scheduler] discover_hosts_in_cells_interval = 300 ==== - Project invisible-to-admin can't start instance ==== Demo user uses nonvisible-to-admin by default causing some access denied: Logs (/var/log/syslog): Jan 31 13:26:19 xubuntu devstack@n-api.service[962]: #033[00;32mDEBUG nova.policy [#033[01;36mNone req-81e36230-cd1b-4ca4-8d77-88d18b6044f0 #033[00;36minvisible_to_admin demo#033[00;32m] #033[01;35m#033[00;32mPolicy check for os_compute_api:os-extended-server-attributes failed with credentials {'service_roles': [], 'user_id': u'bceef1ade22443338ae643f679326c31', 'roles': [u'member', u'reader'], 'system_scope': None, 'service_project_id': None, 'service_user_id': None, 'service_user_domain_id': None, 'service_project_domain_id': None, 'is_admin_project': True, 'is_admin': False, 'user_domain_id': u'default', 'project_id': u'0be264783708436b826e2b9761ef5ad8', 'domain_id': None, 'project_domain_id': u'default'}#033[00m #033[00;33m{{(pid=1140) authorize /opt/stack/nova/nova/policy.py:167}}#033[00m#033[00m Jan 31 13:26:19 xubuntu devstack@n-api.service[962]: #033[00;32mDEBUG nova.policy [#033[01;36mNone req-81e36230-cd1b-4ca4-8d77-88d18b6044f0 #033[00;36minvisible_to_admin demo#033[00;32m] #033[01;35m#033[00;32mPolicy check for os_compute_api:servers:show:host_status failed with credentials {'service_roles': [], 'user_id': u'bceef1ade22443338ae643f679326c31', 'roles': [u'member', u'reader'], 'system_scope': None, 'service_project_id': None, 'service_user_id': None, 'service_user_domain_id': None, 'service_project_domain_id': None, 'is_admin_project': True, 'is_admin': False, 'user_domain_id': u'default', 'project_id': u'0be264783708436b826e2b9761ef5ad8', 'domain_id': None, 'project_domain_id': u'default'}#033[00m #033[00;33m{{(pid=1140) authorize /opt/stack/nova/nova/policy.py:167}}#033[00m#033[00m ** switch to demo project ** ====== Headline ======