diff --git a/.gitignore b/.gitignore index 4c453f6b897..ac80534ca67 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ config.tfvars id_rsa* pull-secret.json ssh-key.pem -tectonic-*.tar.gz +openshift-installer-*.tar.gz tectonic-license.txt terraform.tfstate* terraform.tfvars @@ -13,7 +13,7 @@ bin/ bin_test/ matchbox/ /contrib/govcloud/vpn.conf -tectonic-dev +openshift-installer-dev # Bazel .build/ @@ -22,5 +22,5 @@ bazel-bin bazel-out bazel-genfiles bazel-testlogs -bazel-tectonic-installer +bazel-openshift-installer .cache diff --git a/BUILD.bazel b/BUILD.bazel index 3541cdf2abb..8d03b88ae18 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,5 @@ load("//bazel-rules:gen_test.bzl", "gen_test") -load("//:version.bzl", "TECTONIC_VERSION") +load("//:version.bzl", "OPENSHIFT_VERSION") package( default_visibility = ["//visibility:public"], @@ -49,7 +49,7 @@ alias( alias( name = "cli", - actual = "//installer/cmd/tectonic", + actual = "//installer/cmd/openshift-install", ) template_files = glob([ @@ -69,18 +69,18 @@ load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") alias( name = "tarball", - actual = ":tectonic-%s" % TECTONIC_VERSION, + actual = ":openshift-installer-%s" % OPENSHIFT_VERSION, ) pkg_tar( - name = "tectonic-%s" % TECTONIC_VERSION, + name = "openshift-installer-%s" % OPENSHIFT_VERSION, mode = "0666", srcs = [ "//:template_resources", "//examples:tectonic_cli_examples", ], extension = "tar.gz", - package_dir = "tectonic-%s" % TECTONIC_VERSION, + package_dir = "openshift-installer-%s" % OPENSHIFT_VERSION, strip_prefix = ".", deps = [ ":cli_bin", @@ -91,7 +91,7 @@ pkg_tar( pkg_tar( name = "cli_bin", mode = "0777", - srcs = ["//installer/cmd/tectonic"], + srcs = ["//installer/cmd/openshift-install"], package_dir = "installer", ) diff --git a/Documentation/dev/bazel-in-depth.md b/Documentation/dev/bazel-in-depth.md index 379613de5ea..b2c13178ccf 100644 --- a/Documentation/dev/bazel-in-depth.md +++ b/Documentation/dev/bazel-in-depth.md @@ -1,6 +1,6 @@ # Bazel Under The Hood -The goal of this document is to detail the steps taken by Bazel when building the Tectonic Installer project so that users better understand the process. Ultimately, a user building the project could elect to build the project without Bazel, either by hand or otherwise. *Note*: building without Bazel is not recommended because it will lead to non-hermetic builds, which could lead to unpredictable results. We strongly recommend using the build instructions outlined in the README for consistent, reproducible builds. +The goal of this document is to detail the steps taken by Bazel when building the OpenShift Installer project so that users better understand the process. Ultimately, a user building the project could elect to build the project without Bazel, either by hand or otherwise. *Note*: building without Bazel is not recommended because it will lead to non-hermetic builds, which could lead to unpredictable results. We strongly recommend using the build instructions outlined in the README for consistent, reproducible builds. This document covers the process of building the `tarball` Bazel target, which is the main target of the project. @@ -8,17 +8,17 @@ This document covers the process of building the `tarball` Bazel target, which i As noted in [build.md](build.md), the goal of the build process is to produce an archive with the following file structure: ``` -tectonic +openshift-installer ├── config.tf ├── examples ├── modules ├── steps -└── tectonic-installer +└── installer ├── darwin - │ ├── tectonic + │ ├── openshift-install │ └── terraform └── linux - ├── tectonic + ├── openshift-install └── terraform ``` @@ -26,26 +26,26 @@ tectonic ### Directories Prepare the necessary output directories: -* `tectonic` -* `tectonic/examples` -* `tectonic/modules` -* `tectonic/steps` -* `tectonic/tectonic-installer` -* `tectonic/tectonic-installer/darwin` -* `tectonic/tectonic-installer/linux` +* `openshift-installer` +* `openshift-installer/examples` +* `openshift-installer/modules` +* `openshift-installer/steps` +* `openshift-installer/installer` +* `openshift-installer/installer/darwin` +* `openshift-installer/installer/linux` ### Go Build -Build the Tectonic CLI Golang binary located in `tectonic/installer/cmd/tectonic` using `go build …` -The binary should be built for both Darwin and Linux and placed in the corresponding output directory, i.e. `tectonic/tectonic-installer/darwin`, or `tectonic/tectonic-installer/linux`. +Build the OpenShift Installer CLI Golang binary located in `openshift-installer/installer/cmd/openshift-install` using `go build …` +The binary should be built for both Darwin and Linux and placed in the corresponding output directory, i.e. `openshift-installer/installer/darwin`, or `openshift-installer/installer/linux`. ### Terraform Binaries Download binaries for Terraform for both Darwin and Linux and place them in the corresponding output directories. ### Terraform Configuration -Copy all required Terraform configuration files from their source directories and place them in the correct output directory. Specifically, `config.tf`, `modules` and `steps` should be copied to the output directory at `tectonic/config.tf`, `tectonic/modules`, and `tectonic/steps`, respectively. +Copy all required Terraform configuration files from their source directories and place them in the correct output directory. Specifically, `config.tf`, `modules` and `steps` should be copied to the output directory at `openshift-installer/config.tf`, `openshift-installer/modules`, and `openshift-installer/steps`, respectively. ### Configuration Examples -Copy the Tectonic Installer configuration examples from `examples` to the output directory at `tectonic/examples`. +Copy the OpenShift Installer configuration examples from `examples` to the output directory at `openshift-installer/examples`. ### Archive Lastly, archive and gzip the output directory using the `tar` utility to produce the final asset. diff --git a/Documentation/dev/build.md b/Documentation/dev/build.md index 473d96c7a3e..af7d474579b 100644 --- a/Documentation/dev/build.md +++ b/Documentation/dev/build.md @@ -1,6 +1,6 @@ -# Building Tectonic Installer +# Building OpenShift Installer -The Tectonic Installer leverages the [Bazel build system](https://bazel.build/) to build all artifacts, binaries, and documentation. +The OpenShift Installer leverages the [Bazel build system](https://bazel.build/) to build all artifacts, binaries, and documentation. ## Getting Started @@ -8,23 +8,23 @@ Install Bazel > 0.11.x using the instructions [provided online](https://docs.baz *Note*: compiling Bazel from source requires Bazel. *Note*: some Linux platforms may require installing _Static libraries for the GNU standard C++ library_ (on Fedora `dnf install libstdc++-static`) -Clone the Tectonic Installer git repository locally: +Clone the OpenShift Installer git repository locally: ```sh -git clone git@github.com:coreos/tectonic-installer.git && cd tectonic-installer +git clone git@github.com:openshift/installer.git && cd installer ``` ## Quickstart -To build Tectonic for development or testing, build the `tarball` target with Bazel: +To build OpenShift for development or testing, build the `tarball` target with Bazel: ```sh bazel build tarball ``` -This will produce an archive named `tectonic.tar.gz` in the `bazel-bin` directory, containing all the assets necessary to bring up a Tectonic cluster, namely the: +This will produce an archive named `openshift-installer-dev.tar.gz` in the `bazel-bin` directory, containing all the assets necessary to bring up a OpenShift cluster, namely the: -* Tectonic Installer binary; +* OpenShift Installer binary; * Terraform modules; * Terraform binary; * Terraform provider binaries; and @@ -34,17 +34,17 @@ To use the installer you can now do the following: ```sh cd bazel-bin -tar -xvzf tectonic.tar.gz -cd tectonic +tar -xvzf openshift-installer-dev.tar.gz +cd openshift-installer-dev ``` Then proceed using the installer as documented on [coreos.com](https://coreos.com/tectonic/docs/). -For more details on building a Tectonic release or other Tectonic assets as well as workarounds to some known issues, read on. +For more details on building a OpenShift release or other OpenShift assets as well as workarounds to some known issues, read on. ## Building A Release Tarball -To build a release tarball for the Tectonic Installer, issue the following command from the `tectonic-installer` root directory: +To build a release tarball for the OpenShift Installer, issue the following command from the `installer` root directory: ```sh bazel build tarball @@ -56,41 +56,33 @@ bazel build tarball bazel build --force_python=py2 --python_path=/usr/bin/python2 tarball ``` -This will create a tarball named `tectonic.tar.gz` in the `bazel-bin` directory with the following directory structure: +This will create a tarball named `openshift-installer-dev.tar.gz` in the `bazel-bin` directory with the following directory structure: ``` -tectonic +openshift-installer-dev ├── config.tf ├── examples +├── installer ├── modules -├── steps -└── tectonic-installer - ├── darwin - │   ├── tectonic - │   ├── terraform - │   └── terraform-provider-matchbox - └── linux - ├── tectonic - ├── terraform - └── terraform-provider-matchbox +└── steps ``` -In order to build a release tarball with the version string in the directory name within the tarball, export a `TECTONIC_VERSION` environment variable and then build the tarball while passing the variable to the build: +In order to build a release tarball with the version string in the directory name within the tarball, export a `OPENSHIFT_VERSION` environment variable and then build the tarball while passing the variable to the build: ```sh -export TECTONIC_VERSION=1.2.3-beta -bazel build tarball --action_env=TECTONIC_VERSION +export OPENSHIFT_VERSION=1.2.3-beta +bazel build tarball --action_env=OPENSHIFT_VERSION ``` -This will create a tarball named `tectonic.tar.gz` in the `bazel-bin` directory with the following directory structure: +This will create a tarball named `openshift-install.tar.gz` in the `bazel-bin` directory with the following directory structure: ``` -tectonic_1.2.3-beta +openshift-install_1.2.3-beta ├── config.tf ├── examples +├── installer ├── modules -├── steps -└── tectonic-installer +└── steps ``` *Note*: the generated tarball will not include the version string in its own name since output names must be known ahead of time in Bazel. To include the version in the tarball name, copy or move the archive with the desired name in the destination. @@ -104,7 +96,7 @@ bazel build tests/smoke ``` This operation will produce a binary located at `bazel-bin/tests/smoke/linux_amd64_stripped/smoke`, if on a Linux machine, or `bazel-bin/tests/smoke/darwin_amd64_stripped/smoke`, if on a Mac. -Follow the [smoke test instructions][smoke-test] to test a Tectonic cluster using this newly compiled binary. +Follow the [smoke test instructions][smoke-test] to test a OpenShift cluster using this newly compiled binary. ## Cleaning diff --git a/Documentation/dev/libvirt-howto.md b/Documentation/dev/libvirt-howto.md index 1822a654b0b..6fe36dff2df 100644 --- a/Documentation/dev/libvirt-howto.md +++ b/Documentation/dev/libvirt-howto.md @@ -87,26 +87,26 @@ bazel build tarball ### 3. Create a cluster ```sh -tar -zxf bazel-bin/tectonic-dev.tar.gz -cd tectonic-dev +tar -zxf bazel-bin/openshift-installer-dev.tar.gz +cd openshift-installer-dev export PATH=$(pwd)/installer:$PATH ``` Initialize (the environment variables are a convenience): ```sh -tectonic init --config=../tectonic.libvirt.yaml +openshift-install init --config=../tectonic.libvirt.yaml export CLUSTER_NAME= export BASE_DOMAIN= ``` Install ($CLUSTER_NAME is `test1`): ```sh -tectonic install --dir=$CLUSTER_NAME +openshift-install install --dir=$CLUSTER_NAME ``` When you're done, destroy: ```sh -tectonic destroy --dir=$CLUSTER_NAME +openshift-install destroy --dir=$CLUSTER_NAME ``` Be sure to destroy, or else you will need to manually use virsh to clean up the leaked resources. diff --git a/Documentation/dev/node-bootstrap-flow.md b/Documentation/dev/node-bootstrap-flow.md index b21e4b0c380..91350fa35c6 100644 --- a/Documentation/dev/node-bootstrap-flow.md +++ b/Documentation/dev/node-bootstrap-flow.md @@ -1,6 +1,6 @@ # Node bootstrapping flow -This is a development document which describes the bootstrapping flow for ContainerLinux nodes provisioned by the tectonic-installer as part of a Tectonic cluster. +This is a development document which describes the bootstrapping flow for ContainerLinux nodes provisioned by the openshift-installer as part of a OpenShift cluster. ## Overview @@ -24,7 +24,7 @@ Additionally, only on one of the master nodes the following kubernetes bootstrap ## Systemd units -The following systemd unit is deployed to a node by tectonic-installer and take part in the bootstrapping process: +The following systemd unit is deployed to a node by openshift-installer and take part in the bootstrapping process: * `kubelet.service` is the main kubelet daemon. It is automatically started on boot. diff --git a/Jenkinsfile b/Jenkinsfile index a7e2ce57c60..26c97dbac1d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,10 +82,10 @@ pipeline { sh """#!/bin/bash -e export HOME=/home/jenkins ./tests/run.sh - cp bazel-bin/tectonic-dev.tar.gz . + cp bazel-bin/openshift-installer-dev.tar.gz . """ // Produce an artifact which can be downloaded via web UI - stash name: 'tectonic-tarball', includes: 'tectonic-dev.tar.gz' + stash name: 'openshift-installer-tarball', includes: 'openshift-installer-dev.tar.gz' } } } @@ -100,7 +100,7 @@ pipeline { withCredentials(quayCreds) { ansiColor('xterm') { sh """ - docker build -t quay.io/coreos/tectonic-installer:master -f images/tectonic-installer/Dockerfile . + docker build -t quay.io/coreos/tectonic-installer:master -f images/openshift-installer/Dockerfile . docker login -u="$QUAY_ROBOT_USERNAME" -p="$QUAY_ROBOT_SECRET" quay.io docker push quay.io/coreos/tectonic-installer:master docker logout quay.io diff --git a/README.md b/README.md index c35c123befa..42ecc3e2ce9 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ These instructions can be used for AWS: 3. Extract the tarball ```sh - tar -zxf bazel-bin/tectonic-dev.tar.gz - cd tectonic-dev + tar -zxf bazel-bin/openshift-installer-dev.tar.gz + cd openshift-installer-dev ``` 4. Add binaries to $PATH @@ -34,28 +34,28 @@ These instructions can be used for AWS: export PATH=$(pwd)/installer:$PATH ``` -5. Edit Tectonic configuration file including the $CLUSTER_NAME +5. Edit OpenShift configuration file including the $CLUSTER_NAME ```sh - $EDITOR examples/tectonic.aws.yaml + $EDITOR examples/openshift.aws.yaml ``` -6. Init Tectonic CLI +6. Init OpenShift Installer CLI ```sh - tectonic init --config=examples/tectonic.aws.yaml + openshift-install init --config=examples/openshift.aws.yaml ``` -7. Install Tectonic cluster +7. Install OpenShift cluster ```sh - tectonic install --dir=$CLUSTER_NAME + openshift-install install --dir=$CLUSTER_NAME ``` 8. Visit `https://{$CLUSTER_NAME}-api.${BASE_DOMAIN}:6443/console/`. You may need to ignore a certificate warning if you did not configure a CA known to your browser. - Log in with the admin credentials you configured in `tectonic.aws.yaml`. + Log in with the admin credentials you configured in `openshift.aws.yaml`. -9. Teardown Tectonic cluster +9. Teardown OpenShift cluster ```sh - tectonic destroy --dir=$CLUSTER_NAME + openshift-install destroy --dir=$CLUSTER_NAME ``` ## Managing Dependencies diff --git a/buildvars.sh b/buildvars.sh index 80951d8beaf..d458101b049 100755 --- a/buildvars.sh +++ b/buildvars.sh @@ -1,5 +1,5 @@ #!/bin/bash -e # Vars exported to the build info -echo TECTONIC_VERSION "${TECTONIC_VERSION}" +echo OPENSHIFT_VERSION "${OPENSHIFT_VERSION}" echo BUILD_TIME "$(date -u '+%Y-%m-%dT%H:%M:%S%z')" diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 33b91ac6a78..82089cf59d6 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,4 +1,4 @@ -example_cli_configs = glob(["tectonic.*.yaml"]) +example_cli_configs = glob(["openshift.*.yaml"]) filegroup( name = "tectonic_cli_examples", diff --git a/examples/tectonic.aws.yaml b/examples/openshift.aws.yaml similarity index 100% rename from examples/tectonic.aws.yaml rename to examples/openshift.aws.yaml diff --git a/examples/tectonic.libvirt.yaml b/examples/openshift.libvirt.yaml similarity index 100% rename from examples/tectonic.libvirt.yaml rename to examples/openshift.libvirt.yaml diff --git a/images/tectonic-installer/Dockerfile b/images/openshift-installer/Dockerfile similarity index 60% rename from images/tectonic-installer/Dockerfile rename to images/openshift-installer/Dockerfile index c5754f53447..4bf8dc7419f 100644 --- a/images/tectonic-installer/Dockerfile +++ b/images/openshift-installer/Dockerfile @@ -2,6 +2,6 @@ FROM alpine:3.7 # Docker build does not follow symlinks (see # https://github.com/moby/moby/issues/1676) Make sure to first copy the tarball -# from bazel-bin/tectonic.tar.gz to the docker build context folder of your +# from bazel-bin/openshift-installer.tar.gz to the docker build context folder of your # choice (e.g. the root of the repository). -ADD tectonic-dev.tar.gz / +ADD openshift-installer-dev.tar.gz / diff --git a/images/tectonic-installer/Dockerfile.ci b/images/openshift-installer/Dockerfile.ci similarity index 55% rename from images/tectonic-installer/Dockerfile.ci rename to images/openshift-installer/Dockerfile.ci index 558211e89d9..97339a3e8ff 100644 --- a/images/tectonic-installer/Dockerfile.ci +++ b/images/openshift-installer/Dockerfile.ci @@ -1,28 +1,25 @@ -# This Dockerfile is a used as a CI job to validate Tectonic installer on CentOS +# This Dockerfile is a used as a CI job to validate OpenShift installer on CentOS FROM openshift/origin-release:golang-1.9 as build WORKDIR /go/src/github.com/openshift/installer COPY . . ### Install Terraform ENV TERRAFORM_VERSION="0.11.1" -# Install Terraform -# TERRAFORM_URL enables us to build the upstream-terraform Tectonic builder -# image (See README.md/##Upstream-and-CoreOS-Terraform) ARG TERRAFORM_URL=https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -RUN go build -o ./installer/tectonic ./installer/cmd/tectonic && \ +RUN go build -o ./installer/openshift-install ./installer/cmd/openshift-install && \ yum install -y unzip && \ yum clean all && \ curl -L ${TERRAFORM_URL} | funzip > ./installer/terraform && chmod +x ./installer/terraform && \ - tar cvzf /opt/tectonic-dev.tar.gz ./installer/tectonic ./installer/terraform ./modules ./config.tf ./steps + tar cvzf /opt/openshift-installer-dev.tar.gz ./installer/openshift-install ./installer/terraform ./modules ./config.tf ./steps FROM centos:7 -COPY --from=build /opt/tectonic-dev.tar.gz /tmp/tectonic-dev.tar.gz +COPY --from=build /opt/openshift-installer-dev.tar.gz /tmp/openshift-installer-dev.tar.gz ENV HOME /home/user ENV PATH $PATH:/home/user/installer RUN yum install -y gettext && \ yum clean all && \ mkdir -p ${HOME}/installer && chmod 777 -R ${HOME} && \ - tar xzf /tmp/tectonic-dev.tar.gz -C ${HOME} + tar xzf /tmp/openshift-installer-dev.tar.gz -C ${HOME} WORKDIR /home/user diff --git a/images/tectonic-installer/README.md b/images/openshift-installer/README.md similarity index 94% rename from images/tectonic-installer/README.md rename to images/openshift-installer/README.md index 051f9e3d367..9885f40b723 100644 --- a/images/tectonic-installer/README.md +++ b/images/openshift-installer/README.md @@ -1,4 +1,4 @@ -# tectonic-installer +# openshift-installer [![Container Repository on Quay](https://quay.io/repository/coreos/tectonic-installer/status "Container Repository on Quay")](https://quay.io/repository/coreos/tectonic-installer) diff --git a/images/tectonic-builder/Dockerfile b/images/tectonic-builder/Dockerfile deleted file mode 100644 index 84d21cf0635..00000000000 --- a/images/tectonic-builder/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -### -# Update the builder image manually by running: -# (See README.md/##Upstream-and-CoreOS-Terraform) -# -# docker build -t quay.io/coreos/tectonic-builder: -f images/builder/Dockerfile . -# docker push quay.io/coreos/tectonic-builder: -# -# docker build \ -# --build-arg TERRAFORM_URL= \ -# -t quay.io/coreos/tectonic-builder:-upstream-terraform \ -# -f images/builder/Dockerfile . -# docker push quay.io/coreos/tectonic-builder:-upstream-terraform -### - -FROM golang:1.9.2-stretch - -### For golang testing stuff -RUN go get -u github.com/golang/lint/golint -RUN go get github.com/jstemmer/go-junit-report - -### Tools used by 'make structure-check' -RUN rm -rf /go/src/github.com/openshift/installer/ -RUN go get github.com/bronze1man/yaml2json - -### License parser -RUN go get github.com/coreos/license-bill-of-materials - -### 'grafiti' for cluster cleanup -ENV GRAFITI_VERSION "v0.1.1" -RUN git clone -q https://github.com/coreos/grafiti.git ${GOPATH}/src/github.com/coreos/grafiti \ - && cd ${GOPATH}/src/github.com/coreos/grafiti \ - && git checkout -q tags/${GRAFITI_VERSION} \ - && make install - -# /go needs to be writable by jenkins user like it is in the upstream golang image -RUN chmod 777 -R /go - -### Install Shellcheck and Terraform -ENV SHELLCHECK_VERSION="v0.4.6" -ENV TERRAFORM_VERSION="0.11.1" -ENV HOME /opt/home -RUN mkdir -p ${HOME} && \ - chmod 777 -R ${HOME} && \ - apt-get update && \ - apt-get install --no-install-recommends -y -q \ - build-essential sudo curl wget git autoconf automake unzip libtool jq awscli gnupg1 \ - openvpn xauth - -# Install Terraform -# TERRAFORM_URL enables us to build the upstream-terraform Tectonic builder -# image (See README.md/##Upstream-and-CoreOS-Terraform) -ARG TERRAFORM_URL=https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -RUN curl -L ${TERRAFORM_URL} | funzip > /usr/local/bin/terraform && chmod +x /usr/local/bin/terraform - -# Install Shellcheck -RUN cd /tmp && \ - wget --quiet https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz && \ - tar xJf shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz && \ - mv /tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/shellcheck diff --git a/images/tectonic-builder/README.md b/images/tectonic-builder/README.md deleted file mode 100644 index 63e6a1e58cd..00000000000 --- a/images/tectonic-builder/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# tectonic-builder - -[![Container Repository on Quay](https://quay.io/repository/coreos/tectonic-builder/status "Container Repository on Quay")](https://quay.io/repository/coreos/tectonic-builder) - -This container image contains the environment required to build and test the -[Tectonic Installer](../../installer) and aims at facilitating the implementation -of CI/CD pipelines. More particularly, this image is used in several Jenkins -jobs today for testing purposes. - -## Upstream and CoreOS Terraform - -The Tectonic CI is currently using a custom Terraform version for the default -pipeline (See https://github.com/coreos/tectonic-installer/pull/1247). As end -users of Tectonic installer use upstream Terraform we need to test with upstream -Terraform as well. We are building and publishing the Tectonic builder image -both with CoreOS Terraform as well as upstream Terraform. This is done via -docker `--build-arg` `TERRAFORM_URL`. CoreOS Terraform is used for normal PR and -branch tests, upstream Terraform is used once per day on master. - -Example: -- CoreOS Terraform (default): -`docker build -t quay.io/coreos/tectonic-builder:v1.33 -f images/tectonic-builder/Dockerfile .` -- Upstream Terraform: -`docker build -t quay.io/coreos/tectonic-builder:v1.33-upstream-terraform --build-arg TERRAFORM_URL=https://releases.hashicorp.com/terraform/0.9.11/terraform_0.9.11_linux_amd64.zip -f images/tectonic-builder/Dockerfile .` diff --git a/installer/cmd/tectonic/BUILD.bazel b/installer/cmd/openshift-install/BUILD.bazel similarity index 81% rename from installer/cmd/tectonic/BUILD.bazel rename to installer/cmd/openshift-install/BUILD.bazel index 7a3944e2a22..bc72e8f21b6 100644 --- a/installer/cmd/tectonic/BUILD.bazel +++ b/installer/cmd/openshift-install/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "go_default_library", srcs = ["main.go"], - importpath = "github.com/openshift/installer/installer/cmd/tectonic", + importpath = "github.com/openshift/installer/installer/cmd/openshift-install", visibility = ["//visibility:private"], deps = [ "//installer/pkg/workflow:go_default_library", @@ -13,8 +13,8 @@ go_library( ) go_binary( - name = "tectonic", - out = "tectonic", + name = "openshift-install", + out = "openshift-install", data = ["//:template_resources"], embed = [":go_default_library"], # Use pure to build a pure-go binary. diff --git a/installer/cmd/tectonic/main.go b/installer/cmd/openshift-install/main.go similarity index 100% rename from installer/cmd/tectonic/main.go rename to installer/cmd/openshift-install/main.go diff --git a/tests/run.sh b/tests/run.sh index 35ee658f213..55bf7ea9954 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -18,8 +18,8 @@ CLUSTER_NAME=$(echo "${PREFIX}-$(uuidgen -r | cut -c1-5)" | tr '[:upper:]' '[:lo exec &> >(tee -a "$CLUSTER_NAME.log") function destroy() { - echo -e "\\e[34m Exiting... Destroying Tectonic and cleaning SSH keys...\\e[0m" - tectonic destroy --dir="${CLUSTER_NAME}" + echo -e "\\e[34m Exiting... Destroying OpenShift and cleaning SSH keys...\\e[0m" + openshift-install destroy --dir="${CLUSTER_NAME}" aws ec2 delete-key-pair --key-name "${CLUSTER_NAME}" echo -e "\\e[36m Finished! Smoke test output:\\e[0m ${SMOKE_TEST_OUTPUT}" echo -e "\\e[34m So Long, and Thanks for All the Fish\\e[0m" @@ -33,12 +33,12 @@ bazel build tarball tests/smoke # docker run --rm -v $PWD:$PWD:Z -w $PWD quay.io/coreos/tectonic-builder:bazel-v0.3 bazel build tarball tests/smoke echo -e "\\e[36m Unpacking artifacts...\\e[0m" -tar -zxf bazel-bin/tectonic-dev.tar.gz -cp bazel-bin/tests/smoke/linux_amd64_stripped/smoke tectonic-dev/smoke -export PATH="$(pwd)/tectonic-dev/installer:${PATH}" -cd tectonic-dev +tar -zxf bazel-bin/openshift-installer-dev.tar.gz +cp bazel-bin/tests/smoke/linux_amd64_stripped/smoke openshift-installer-dev/smoke +export PATH="$(pwd)/openshift-installer-dev/installer:${PATH}" +cd openshift-installer-dev -echo -e "\\e[36m Creating Tectonic configuration...\\e[0m" +echo -e "\\e[36m Creating OpenShift configuration...\\e[0m" CONFIG=$(python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < examples/tectonic.aws.yaml) CONFIG=$(echo "${CONFIG}" | jq ".name = \"${CLUSTER_NAME}\"" |\ jq ".baseDomain = \"${DOMAIN}\"" |\ @@ -51,8 +51,8 @@ CONFIG=$(echo "${CONFIG}" | jq ".name = \"${CLUSTER_NAME}\"" |\ ) echo "${CONFIG}" | python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout)' > "${CLUSTER_NAME}.yaml" -echo -e "\\e[36m Initializing Tectonic...\\e[0m" -tectonic init --config="${CLUSTER_NAME}".yaml +echo -e "\\e[36m Initializing OpenShift...\\e[0m" +openshift-install init --config="${CLUSTER_NAME}".yaml ### ASSUME ROLE ### echo -e "\\e[36m Setting up AWS credentials...\\e[0m" @@ -74,8 +74,8 @@ fi aws ec2 import-key-pair --key-name "${CLUSTER_NAME}" --public-key-material "file://$HOME/.ssh/id_rsa.pub" export TF_VAR_tectonic_aws_ssh_key="${CLUSTER_NAME}" -echo -e "\\e[36m Deploying Tectonic...\\e[0m" -tectonic install --dir="${CLUSTER_NAME}" +echo -e "\\e[36m Deploying OpenShift...\\e[0m" +openshift-install install --dir="${CLUSTER_NAME}" echo -e "\\e[36m Running smoke test...\\e[0m" export SMOKE_KUBECONFIG="$(pwd)/$CLUSTER_NAME/generated/auth/kubeconfig" export SMOKE_NETWORKING="canal" diff --git a/version.bzl b/version.bzl index 57182b95e6f..afe55dbcd1c 100644 --- a/version.bzl +++ b/version.bzl @@ -5,4 +5,4 @@ # # THIS FILE SHOULD BE AUTOGENERATED BY RELEASE AUTOMATION. -TECTONIC_VERSION="dev" +OPENSHIFT_VERSION="dev"