-
Notifications
You must be signed in to change notification settings - Fork 1.5k
*.*: Rename tectonic-installer to openshift-installer #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,51 @@ | ||
| # 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. | ||
|
|
||
| ## Build Layout | ||
| 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 | ||
| ``` | ||
|
|
||
| ## Steps | ||
| ### 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. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,30 @@ | ||
| # 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 | ||
|
|
||
| Install Bazel > 0.11.x using the instructions [provided online](https://docs.bazel.build/versions/master/install.html). | ||
| *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 [email protected]:coreos/tectonic-installer.git && cd tectonic-installer | ||
| git clone [email protected]: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 | ||
|
|
||
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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')" |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This directory is stale, see #53.