blob: 83f355aa6040cbd7fd8551eb8c024b00b2d421d4 [file] [log] [blame]
Andy Bavier188aff12018-05-18 05:43:55 -07001#!/bin/bash
2#
3# Copyright 2017-present Open Networking Foundation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17###########################################################
18# Install openstack-helm dev setup on Ubuntu 16.04 server #
19# Including customizations to Neutron for CORD #
20###########################################################
21
22set -xe
23
24# CORD versioning
25OPENSTACK_HELM_BRANCH="${OPENSTACK_HELM_BRANCH:-master}"
26
27# openstack-helm steps to execute
28STEPS="000-install-packages 010-deploy-k8s 020-setup-client 030-ingress 040-ceph 045-ceph-ns-activate 050-mariadb 060-rabbitmq 070-memcached 080-keystone 090-heat 110-ceph-radosgateway 120-glance 140-openvswitch 150-libvirt 160-compute-kit"
29
30
31# Set up extra disk space if running on CloudLab
32DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
33if [ -d /usr/local/etc/emulab ]
34then
35 sudo delgroup docker || true
36 "$DIR"/cloudlab-disk-setup.sh
37fi
38
39cd ~
40[ ! -e openstack-helm-infra ] && git clone https://git.openstack.org/openstack/openstack-helm-infra.git -b "${OPENSTACK_HELM_BRANCH}"
41[ ! -e openstack-helm ] && git clone https://git.openstack.org/openstack/openstack-helm.git -b "${OPENSTACK_HELM_BRANCH}"
42
43# Customizations for CORD
44cat <<EOF > /tmp/glance-cord.yaml
45---
46network:
47 api:
48 ingress:
49 annotations:
50 nginx.ingress.kubernetes.io/proxy-body-size: "0"
51EOF
52export OSH_EXTRA_HELM_ARGS_GLANCE="-f /tmp/glance-cord.yaml"
53
54cat <<EOF > /tmp/nova-cord.yaml
55---
56labels:
57 api_metadata:
58 node_selector_key: openstack-helm-node-class
59 node_selector_value: primary
60network:
61 backend: []
62pod:
63 replicas:
64 api_metadata: 1
65 placement: 1
66 osapi: 1
67 conductor: 1
68 consoleauth: 1
69 scheduler: 1
70 novncproxy: 1
71EOF
72export OSH_EXTRA_HELM_ARGS_NOVA="-f /tmp/nova-cord.yaml"
73
74cat <<EOF > /tmp/neutron-cord.yaml
75---
76images:
77 tags:
78 neutron_server: xosproject/neutron-onos:newton
79manifests:
80 daemonset_dhcp_agent: false
81 daemonset_l3_agent: false
82 daemonset_lb_agent: false
83 daemonset_metadata_agent: false
84 daemonset_ovs_agent: false
85 daemonset_sriov_agent: false
86network:
87 backend: []
88 interface:
89 tunnel: "eth0"
90pod:
91 replicas:
92 server: 1
93conf:
94 plugins:
95 ml2_conf:
96 ml2:
97 type_drivers: vxlan
98 tenant_network_types: vxlan
99 mechanism_drivers: onos_ml2
100 ml2_type_vxlan:
101 vni_ranges: 1001:2000
102 onos:
103 url_path: http://onos-cord-ui.default.svc.cluster.local:8181/onos/cordvtn
104 username: onos
105 password: rocks
106EOF
107export OSH_EXTRA_HELM_ARGS_NEUTRON="-f /tmp/neutron-cord.yaml"
108
109cd ~/openstack-helm
110for STEP in $STEPS
111do
112 ./tools/deployment/developer/ceph/"$STEP".sh
113done