Created
August 10, 2017 13:38
-
-
Save richm/79f08612ab4557349db473f5cfaf70c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/oshift-oct-new-dev.sh b/oshift-oct-new-dev.sh | |
index a37cded..ba1640c 100755 | |
--- a/oshift-oct-new-dev.sh | |
+++ b/oshift-oct-new-dev.sh | |
@@ -56,7 +56,7 @@ if [ ! -d .venv ] ; then | |
fi | |
PS1=unused | |
source .venv/bin/activate | |
-NO_SKIP=1 | |
+#NO_SKIP=1 | |
if [ -n "${NO_SKIP:-}" ] ; then | |
if pip show origin-ci-tool > /dev/null ; then | |
pip install --upgrade git+https://github.com/openshift/origin-ci-tool.git --process-dependency-links | |
@@ -79,6 +79,12 @@ oct provision remote all-in-one --os $OS --provider aws --stage build --name $IN | |
ip=`getremoteip` | |
fqdn=`getremotefqdn $ip` | |
+if [ -n "${PRESERVE:-}" ] ; then | |
+ id=$( aws ec2 --profile rh-dev describe-instances --output text --filters "Name=tag:Name,Values=$INSTNAME" --query 'Reservations[].Instances[].[InstanceId]' ) | |
+ aws ec2 --profile rh-dev create-tags --resources $id \ | |
+ --tags Key=Name,Value=${INSTNAME}-preserve | |
+fi | |
+ | |
kibana_host=kibana.$fqdn | |
kibana_ops_host=kibana-ops.$fqdn | |
update_etc_hosts $ip $fqdn $kibana_host $kibana_ops_host | |
@@ -93,11 +99,17 @@ oct sync local openshift-ansible --branch $ANSIBLE_BRANCH --merge-into master -- | |
# also needs aos_cd_jobs | |
oct sync remote aos-cd-jobs --branch master | |
+# HACK HACK HACK | |
+# there is a problem with the enterprise-3.3 repo: | |
+#https://use-mirror2.ops.rhcloud.com/enterprise/enterprise-3.3/latest/RH7-RHAOS-3.3/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found | |
+# so just disable this repo for now | |
+ssh -n openshiftdevel "echo enabled=0 | sudo tee -a /etc/yum.repos.d/rhel-7-server-ose-3.3-rpms.repo" | |
+ | |
# title: "build an origin-aggregated-logging release" | |
# repository: "origin-aggregated-logging" | |
# script: |- | |
# hack/build-images.sh | |
-ssh openshiftdevel "cd $OS_O_A_L_DIR; hack/build-images.sh" | |
+ssh -n openshiftdevel "cd $OS_O_A_L_DIR; hack/build-images.sh" | |
# title: "build an openshift-ansible release" | |
# repository: "openshift-ansible" | |
@@ -130,6 +142,7 @@ jobs_repo=$OS_A_C_J_DIR | |
last_tag="\$( git describe --tags --abbrev=0 --exact-match HEAD )" | |
last_commit="\$( git log -n 1 --pretty=%h )" | |
sudo yum install -y "atomic-openshift-utils\${last_tag/openshift-ansible/}.git.0.\${last_commit}.el7" | |
+rpm -V "atomic-openshift-utils\${last_tag/openshift-ansible/}.git.0.\${last_commit}.el7" | |
EOF | |
scp $runfile openshiftdevel:/tmp | |
ssh -n openshiftdevel "bash $runfile" | |
@@ -163,6 +176,23 @@ EOF | |
scp $runfile openshiftdevel:/tmp | |
ssh -n openshiftdevel "bash $runfile" | |
+# make etcd use a ramdisk | |
+cat <<SCRIPT > $runfile | |
+#!/bin/bash | |
+set -o errexit -o nounset -o pipefail -o xtrace | |
+cd "\${HOME}" | |
+sudo su root <<SUDO | |
+mkdir -p /tmp | |
+mount -t tmpfs -o size=4096m tmpfs /tmp | |
+mkdir -p /tmp/etcd | |
+chmod a+rwx /tmp/etcd | |
+restorecon -R /tmp | |
+echo "ETCD_DATA_DIR=/tmp/etcd" >> /etc/environment | |
+SUDO | |
+SCRIPT | |
+scp $runfile openshiftdevel:/tmp | |
+ssh -n openshiftdevel "bash $runfile" | |
+ | |
# title: "install origin" | |
# repository: "aos-cd-jobs" | |
cat > $runfile <<EOF | |
@@ -194,31 +224,64 @@ EOF | |
scp $runfile openshiftdevel:/tmp | |
ssh -n openshiftdevel "bash $runfile" | |
+# HACK - create mux pvc | |
+if [ "${MUX_FILE_BUFFER_STORAGE_TYPE:-}" = pvc ] ; then | |
+ cat > $runfile <<EOF | |
+apiVersion: "v1" | |
+kind: "PersistentVolume" | |
+metadata: | |
+ name: logging-muxpv-1 | |
+spec: | |
+ capacity: | |
+ storage: "6Gi" | |
+ accessModes: | |
+ - "ReadWriteOnce" | |
+ hostPath: | |
+ path: ${FILE_BUFFER_PATH:-/var/lib/fluentd} | |
+EOF | |
+ scp $runfile openshiftdevel:/tmp | |
+ ssh -n openshiftdevel "oc create --config=/etc/origin/master/admin.kubeconfig -f $runfile" | |
+fi | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment