Merge "Treasuremap gate script fixes"
This commit is contained in:
commit
65be6e300b
@ -1 +0,0 @@
|
|||||||
../common/25_deploy_ephemeral_node.sh
|
|
21
tools/deployment/multi-tenant/25_deploy_ephemeral_node.sh
Executable file
21
tools/deployment/multi-tenant/25_deploy_ephemeral_node.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
||||||
|
|
||||||
|
cd ${AIRSHIPCTL_PROJECT}
|
||||||
|
./tools/deployment/25_deploy_ephemeral_node.sh
|
||||||
|
|
30
tools/deployment/templates/airshipconfig_template
Normal file
30
tools/deployment/templates/airshipconfig_template
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: airshipit.org/v1alpha1
|
||||||
|
managementConfiguration:
|
||||||
|
dummy_management_config:
|
||||||
|
type: ${REMOTE_TYPE}
|
||||||
|
insecure: ${REMOTE_INSECURE}
|
||||||
|
useproxy: ${REMOTE_PROXY}
|
||||||
|
systemActionRetries: ${SYSTEM_ACTION_RETRIES}
|
||||||
|
systemRebootDelay: ${SYSTEM_REBOOT_DELAY}
|
||||||
|
contexts:
|
||||||
|
ephemeral-cluster:
|
||||||
|
manifest: dummy_manifest
|
||||||
|
managementConfiguration: dummy_management_config
|
||||||
|
target-cluster:
|
||||||
|
manifest: dummy_manifest
|
||||||
|
managementConfiguration: dummy_management_config
|
||||||
|
currentContext: ephemeral-cluster
|
||||||
|
kind: Config
|
||||||
|
manifests:
|
||||||
|
dummy_manifest:
|
||||||
|
phaseRepositoryName: primary
|
||||||
|
repositories:
|
||||||
|
primary:
|
||||||
|
checkout:
|
||||||
|
branch: ${AIRSHIP_CONFIG_PHASE_REPO_BRANCH}
|
||||||
|
force: false
|
||||||
|
remoteRef: ""
|
||||||
|
tag: ""
|
||||||
|
url: ${AIRSHIP_CONFIG_PHASE_REPO_URL}
|
||||||
|
metadataPath: ${AIRSHIP_CONFIG_METADATA_PATH}
|
||||||
|
targetPath: ${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}
|
@ -1,21 +1,47 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# you may not use this file except in compliance with the License.
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# You may obtain a copy of the License at
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you 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
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# software distributed under the License is distributed on an
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
# See the License for the specific language governing permissions and
|
# KIND, either express or implied. See the License for the
|
||||||
# limitations under the License.
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
export AIRSHIPCTL_PROJECT=${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
export IMAGE_DIR=${IMAGE_DIR:-"/srv/images"}
|
||||||
|
export SERVE_PORT=${SERVE_PORT:-"8099"}
|
||||||
export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-$PWD}
|
export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-$PWD}
|
||||||
|
export TMP_DIR=${TMP_DIR:-"$(dirname $(mktemp -u))"}
|
||||||
|
|
||||||
cd ${AIRSHIPCTL_PROJECT}
|
ANSIBLE_CFG=${ANSIBLE_CFG:-"${HOME}/.ansible.cfg"}
|
||||||
./tools/gate/00_setup.sh
|
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"}
|
||||||
|
PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"}
|
||||||
|
|
||||||
|
mkdir -p "$TMP_DIR"
|
||||||
|
envsubst <"${AIRSHIPCTL_WS}/tools/gate/config_template.yaml" > "$PLAYBOOK_CONFIG"
|
||||||
|
|
||||||
|
# use new version of ansible, Ubuntu has old one
|
||||||
|
sudo apt update
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt -y install software-properties-common python3-pip curl wget ca-certificates
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install docker.io make
|
||||||
|
|
||||||
|
PACKAGES="ansible netaddr"
|
||||||
|
if [[ -z "${http_proxy}" ]]; then
|
||||||
|
sudo pip3 install $PACKAGES
|
||||||
|
else
|
||||||
|
sudo pip3 --proxy "${http_proxy}" install $PACKAGES
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "primary ansible_host=localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3" > "$ANSIBLE_HOSTS"
|
||||||
|
printf "[defaults]\nroles_path = %s/roles\n" "$AIRSHIPCTL_WS" > "$ANSIBLE_CFG"
|
||||||
|
@ -1,20 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# you may not use this file except in compliance with the License.
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# You may obtain a copy of the License at
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you 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
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# software distributed under the License is distributed on an
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
# See the License for the specific language governing permissions and
|
# KIND, either express or implied. See the License for the
|
||||||
# limitations under the License.
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
: ${AIRSHIPCTL_PROJECT:="../airshipctl"}
|
TMP_DIR=${TMP_DIR:-"$(dirname $(mktemp -u))"}
|
||||||
|
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"}
|
||||||
|
PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"}
|
||||||
|
|
||||||
cd ${AIRSHIPCTL_PROJECT}
|
sudo -E ansible-playbook -i "$ANSIBLE_HOSTS" \
|
||||||
./tools/gate/10_build_gate.sh
|
playbooks/airship-treasuremap-build-gate.yaml \
|
||||||
|
-e @"$PLAYBOOK_CONFIG"
|
||||||
|
@ -22,8 +22,8 @@ set -xe
|
|||||||
TMP_DIR=${TMP_DIR:-"$(dirname $(mktemp -u))"}
|
TMP_DIR=${TMP_DIR:-"$(dirname $(mktemp -u))"}
|
||||||
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"}
|
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-"${TMP_DIR}/ansible_hosts"}
|
||||||
PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"}
|
PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"}
|
||||||
|
export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-$PWD}
|
||||||
export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-"../airshipctl"}
|
export AIRSHIP_CONFIG_PHASE_REPO_URL=${AIRSHIP_CONFIG_PHASE_REPO_URL:-$PWD}
|
||||||
|
|
||||||
sudo -E --preserve-env=AIRSHIPCTL_WS ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i "$ANSIBLE_HOSTS" \
|
sudo -E --preserve-env=AIRSHIPCTL_WS ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i "$ANSIBLE_HOSTS" \
|
||||||
playbooks/airship-treasuremap-gate-runner.yaml \
|
playbooks/airship-treasuremap-gate-runner.yaml \
|
||||||
|
Loading…
Reference in New Issue
Block a user