Container Infrastructure Management Service for OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gate_hook.sh 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #!/bin/bash -x
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  4. # not use this file except in compliance with the License. You may obtain
  5. # a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. # License for the specific language governing permissions and limitations
  13. # under the License.
  14. #
  15. # This script is executed inside gate_hook function in devstack gate.
  16. coe=$1
  17. special=$2
  18. export PROJECTS="openstack/barbican $PROJECTS"
  19. export DEVSTACK_LOCAL_CONFIG="enable_plugin heat git://git.openstack.org/openstack/heat stable/ocata"
  20. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service horizon"
  21. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-account"
  22. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-container"
  23. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-object"
  24. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-proxy"
  25. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acentral"
  26. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acompute"
  27. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-evaluator"
  28. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-notifier"
  29. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-api"
  30. export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-collector"
  31. if egrep --quiet '(vmx|svm)' /proc/cpuinfo; then
  32. export DEVSTACK_GATE_LIBVIRT_TYPE=kvm
  33. fi
  34. if [ "$coe" = "mesos" ]; then
  35. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL=https://fedorapeople.org/groups/magnum/ubuntu-mesos-ocata.qcow2"
  36. elif [ "$coe" = "k8s-coreos" ]; then
  37. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL=http://beta.release.core-os.net/amd64-usr/1298.4.0/coreos_production_openstack_image.img.bz2"
  38. elif [ "${coe}${special}" = "k8s-ironic" ]; then
  39. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-kubernetes-ironic-ocata.tar.gz'"
  40. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-kubernetes-ironic-ocata'"
  41. export DEVSTACK_GATE_VIRT_DRIVER="ironic"
  42. # NOTE(yuanying): Current implementation requires only 1 subnet under network
  43. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IP_VERSION=4"
  44. # NOTE(strigazi) keep cinder
  45. # export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service cinder c-sch c-api c-vol"
  46. export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic git://git.openstack.org/openstack/ironic stable/ocata"
  47. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEPLOY_DRIVER=pxe_ssh"
  48. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BAREMETAL_BASIC_OPS=True"
  49. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_LOG_DIR=/opt/stack/new/ironic-bm-logs"
  50. export DEVSTACK_LOCAL_CONFIG+=$'\n'"DEFAULT_INSTANCE_TYPE=baremetal"
  51. export DEVSTACK_LOCAL_CONFIG+=$'\n'"BUILD_TIMEOUT=600"
  52. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_CALLBACK_TIMEOUT=600"
  53. export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_AGENT=openvswitch"
  54. export DEVSTACK_LOCAL_CONFIG+=$'\n'"Q_ML2_TENANT_NETWORK_TYPE=vxlan"
  55. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
  56. export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True"
  57. export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=password"
  58. export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_HASH=password"
  59. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DRIVERS=fake,agent_ssh,agent_ipmitool,pxe_ssh,pxe_ipmitool"
  60. export DEVSTACK_LOCAL_CONFIG+=$'\n'"VOLUME_BACKING_FILE_SIZE=24G"
  61. export DEVSTACK_LOCAL_CONFIG+=$'\n'"FORCE_CONFIG_DRIVE=True"
  62. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEPLOY_DRIVER_ISCSI_WITH_IPA=True"
  63. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
  64. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_IPXE_ENABLED=True"
  65. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=2"
  66. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SSH_PORT=22"
  67. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=1024"
  68. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_DISK=10"
  69. export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=5"
  70. else
  71. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-atomic-ocata.qcow2'"
  72. export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-atomic-ocata'"
  73. fi
  74. # Enable magnum plugin in the last step
  75. export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin magnum git://git.openstack.org/openstack/magnum stable/ocata"
  76. $BASE/new/devstack-gate/devstack-vm-gate.sh