Skip to content
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

Replace references to tectonic with openshift #644

Merged
merged 13 commits into from
Dec 5, 2018
Merged

Replace references to tectonic with openshift #644

merged 13 commits into from
Dec 5, 2018

Conversation

staebler
Copy link
Contributor

@staebler staebler commented Nov 9, 2018

Changes for https://jira.coreos.com/browse/CORS-878.

There are still two types of references to tectonic.

  • Resources are still tagged with tectonicClusterID. I will change this to openshiftClusterID in a subsequent PR. The change requires corresponding changes in other repos. I wanted to isolate the change so that the changes in this PR are not held up.
  • The smoke tests still have references to tectonic because they appear to still use the old tectonic installer. I wasn't sure if there was ongoing work to update these smoke tests or whether we should delete the entire directory. If it is the former, then most if not all of the tectonic references should be removed as a side effect of that work. If it is the latter, then we can remove the smoke tests in a subsequent PR.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 9, 2018
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2018
@abhinavdahiya
Copy link
Contributor

@wking had a previous (can't remember where) suggestion to keep stuff void of both tectonic / openshift esp in tf templates...

@wking
Copy link
Member

wking commented Nov 9, 2018

@wking had a previous (can't remember where) suggestion to keep stuff void of both tectonic / openshift esp in tf templates...

I don't remember where either ;). But yeah, I think it's best to leave what-we're-installing naming out internally (where there should be no parallel installers for other things that we need to distinguish ourselves from). We just need openshift-install in the user-facing command.

@@ -96,7 +96,7 @@ resource "aws_instance" "master" {
tags = "${merge(map(
"Name", "${var.cluster_name}-master-${count.index}",
"kubernetes.io/cluster/${var.cluster_name}", "owned",
"tectonicClusterID", "${var.cluster_id}",
"openshiftClusterID", "${var.cluster_id}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoa, boy ;). This one is quasi-public, so I wouldn't be surprised if we break some third-party tooling with this change. Still, I think dropping tectonic makes sense to get consistent branding. And openshift is probably appropriate here, although I'd be open to "kubernetes.io/cluster-id", ${var.cluster_id} if we could drum up an appetite for a cluster UUID tag at the vanilla Kubernetes level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the change of tectonicClusterID from this PR. I will do it in a subsequent PR.

@@ -3,17 +3,17 @@ locals {
private_endpoints_count = "${var.private_endpoints ? 1 : 0}"
}

data "aws_route53_zone" "tectonic" {
data "aws_route53_zone" "openshift" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential generic name here would be base to match base_domain. I'd also be fine with zone or cluster or similar. I'm not terribly opposed to openshift here though, if folks prefer that to my alternatives.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2018

[Service]
WorkingDirectory=/opt/openshift/openshift
ExecStart=/usr/local/bin/openshift.sh /opt/openshift/auth/kubeconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer a more specific name for this script and service, since "OpenShift" feels like "Kubernetes plus the OpenShift-specific stuff" and not "just the OpenShift-specific stuff" to me. The script is about pushing our manifests into the cluster, so maybe manifests.sh (and manifests.service)? Or initial-manifests.sh? operator-manifests.sh? Or something? special-sauce-beyond-vanilla-kubernetes.sh? ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had changed it to manifests.service and put the manifests that it used at /opt/openshift/manifests, but there were conflicts with manifests coming from another location. I was not in love with the name manifests.service as there are a lot of different manifests used for different purposes. If we really care about changing this name, then we can have a discussion around better names and change it in another PR.

public_endpoints = "${var.tectonic_aws_endpoints == "private" ? false : true}"
private_zone_id = "${var.tectonic_aws_external_private_zone != "" ? var.tectonic_aws_external_private_zone : join("", aws_route53_zone.tectonic_int.*.zone_id)}"
private_endpoints = "${var.openshift_aws_endpoints == "public" ? false : true}"
public_endpoints = "${var.openshift_aws_endpoints == "private" ? false : true}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides tectonic/openshift being redundant. aws is also redundant (it's implied by the module name). I'd be fine with just ingress or some such.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that aws is redundant. However, the aws is needed by the json marshal/unmarshal to distinguish between fields in AWS, Libvirt, and OpenStack in the pkg/tfvars/config struct in case there are fields that would otherwise have identical names. This is a side effect of inlining all of those fields in pkg/tfvars/config.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a side effect of inlining all of those fields in pkg/tfvars/config.

I think Terraform needs a single level. But we only ever need one platform at a time. We could (future work?) invert the structs to embed the generic struct within each per-platform struct.

@wking
Copy link
Member

wking commented Nov 9, 2018

This is also pretty big. It might be easier if we try to bite it off in smaller chunks? E.g. just stuff inside Terraform in one PR. Then the Go -> Terraform JSON serialization in a second PR. Then the pure Go stuff in a third PR?

@abhinavdahiya
Copy link
Contributor

This is also pretty big. It might be easier if we try to bite it off in smaller chunks? E.g. just stuff inside Terraform in one PR. Then the Go -> Terraform JSON serialization in a second PR. Then the pure Go stuff in a third PR?

i would say just separate commits is fine.. separate PR is too much overhead.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2018
@staebler staebler changed the title WIP: Replace references to tectonic with openshift Replace references to tectonic with openshift Nov 27, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2018
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 30, 2018
@abhinavdahiya
Copy link
Contributor

this looks good. @staebler can you do some local libvirt,aws testing and @flaper87 can you take a look to see if any openstack stuff is missing or wrong.

After that lets merge it and iterate then. 😇

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2018
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 5, 2018
@wking
Copy link
Member

wking commented Dec 5, 2018

I just launched a libvrit cluster from febbd75ad, and it came up without issues. And I'm super excited about getting this landed, just needs a rebase now (and one typo fix, although I'm fine landing this without that fix too).

The tectonic prefix in the tfvars are redundant as it identifies the type of installer
being used which is evident already by using that installer.

Changes for https://jira.coreos.com/browse/CORS-878
This makes the corresponding change in the terraform to match the removal of the
terraform prefix in the tfvars json.

Changes for https://jira.coreos.com/browse/CORS-878
The session name when connecting to AWS is changed from starting with TECTONIC_INSTALLER_
to starting with OPENSHIFT_INSTALLER.

The terraform name of the internal route53 zone is changed from terraform_int to
int. The Name tag of the zone is changed from ending with _tectonic_int to ending with _int.

The terraform name of the base route53 zone is changed from tectonic to base.

The terraform name of the api route53 records are changed from tectonic_api_external and
tectonic_api_internal to api_external and api_internal, respectively.

Changes for https://jira.coreos.com/browse/CORS-878
The terraform name of the libvirt network is changed from tectonic_net to net.

Changes for https://jira.coreos.com/browse/CORS-878
…ules

The terraform name of the openstack object storage container is changed from terraform to container.

Changes for https://jira.coreos.com/browse/CORS-878
Change the directory of bootstrap files from /opt/tectonic to /opt/openshift.

Change the directory of files laid down by the Tectonic Manifests asset from
tectonic to openshift.

Change the name of the service that lays down OpenShift manifests from
tectonic.service to openshift.service.

Changes for https://jira.coreos.com/browse/CORS-878
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 5, 2018

@staebler: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-libvirt 24ade67dd692e58e86cd0fd1e9c1aaab5f53ed09 link /test e2e-libvirt

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wking
Copy link
Member

wking commented Dec 5, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wking
Copy link
Member

wking commented Dec 5, 2018

Looks like the job might be hung in tests? @staebler, can you grant me access to ci-op-rk8i4bxq or poke around there yourself and see if anything looks fishy?

@openshift-merge-robot openshift-merge-robot merged commit 57d9180 into openshift:master Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants