diff --git a/tools/deployment/common/deploy-k8s.sh b/tools/deployment/common/deploy-k8s.sh new file mode 100755 index 00000000..986ad805 --- /dev/null +++ b/tools/deployment/common/deploy-k8s.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +CURRENT_DIR="$(pwd)" +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +cd ${OSH_INFRA_PATH} +make dev-deploy setup-host +make dev-deploy k8s +cd ${CURRENT_DIR} diff --git a/tools/deployment/common/install-packages.sh b/tools/deployment/common/install-packages.sh new file mode 100755 index 00000000..fb83bc3e --- /dev/null +++ b/tools/deployment/common/install-packages.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +sudo apt-get update +sudo apt-get install --no-install-recommends -y \ + ca-certificates \ + git \ + make \ + jq \ + nmap \ + curl \ + uuid-runtime diff --git a/tools/deployment/component/ceph/ceph-ns-activate.sh b/tools/deployment/component/ceph/ceph-ns-activate.sh new file mode 100755 index 00000000..7f7f2a17 --- /dev/null +++ b/tools/deployment/component/ceph/ceph-ns-activate.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +#NOTE: Lint and package chart +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +make -C ${OSH_INFRA_PATH} ceph-provisioners + +#NOTE: Deploy command +: ${OSH_EXTRA_HELM_ARGS:=""} +tee /tmp/ceph-openstack-config.yaml < /tmp/ceph-fs-uuid.txt +CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)" +#NOTE(portdirect): to use RBD devices with Ubuntu kernels < 4.5 this +# should be set to 'hammer' +. /etc/os-release +if [ "x${ID}" == "xubuntu" ] && \ + [ "$(uname -r | awk -F "." '{ print $2 }')" -lt "5" ]; then + CRUSH_TUNABLES=hammer +else + CRUSH_TUNABLES=null +fi +tee /tmp/ceph.yaml <