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

Ideas for tack #176

Open
cemo opened this issue May 11, 2017 · 2 comments
Open

Ideas for tack #176

cemo opened this issue May 11, 2017 · 2 comments

Comments

@cemo
Copy link

cemo commented May 11, 2017

Hi @wellsie and others,

I have some ideas about this repo and it would be nice to discuss them. The current way of the project is mostly one time shot. You can not upgrade easily your cluster. You can not run 2 cluster at the same time. My ultimate target is that instead of upgrading clusters, I want to create immutable clusters and nodes. In case an upgrade we can spin up a new one. There are also some projects similar to tack but I found terraform way the easiest one.

It would be cool to split parts. I think that we can split the project mainly 2 major component. A terraform module to create a VPC related things and a module to create Kubernetes cluster. Each version of the kubernetes has a corresponding tag in the tack kubernetes modules.

Since the beginning of this project there are major changes in terraform as well. It has an even k8s provider. There is also a provider related to certificates.

So I propose such changes:

  1. Splitting module into 2 parts. VPC infrastructure & Kubernetes cluster module. Kubernetes module can require VPC parameters. This design gives you to consume tack modules without requiring fork the project. It has a major advantage of running multiple clusters at same time.
  2. Makefiles are errorprone. Let's replace it with terraform providers.

what do you think?

@bruj0
Copy link
Contributor

bruj0 commented May 11, 2017

Im not @wellsie but im using tack :)
I fail to understand what would be the use case for splitting Infrastructure and Kubernetes installation, since the infrastructure is created JUST for Kubernetes, you wont be sharing it with anything else.
Point 2 seems useful but i dont see it as an important issue right now, feel free to send patches tho :)

I think that the best tools are the one that do one thing but they are exceptionally good at it.
Cheers,
Rodrigo

@cemo
Copy link
Author

cemo commented May 17, 2017

Hi @bruj0,

since the infrastructure is created JUST for Kubernetes

This is not true. The current vpc layout can be used for other cluster or schedulers such as nomad or swarm as well. It is one of the recommended layout.

Current architecture of the tack is making upgrades almost impossible. Especially a major change like etcd2->etcd3 is making many things very difficult. Forking the project is another issue. Constantly we have to patch our projects.

I have started refactoring project but I had limited knowledge about k8s internal details such as certificates. I also hit some issues regarding dependency. I will definitely share my insights with yours.

module "infrastructure" {
  source = "url: tack-infrastructure-terraform"
  name = "${var.name}"
  internal-tld = "${var.internal-tld}"
  ssh-public-file = "${file(var.keypair["public-file"])}"
  aws = "${var.aws}"
  cidr = "${var.cidr}"
}

module "cluster-v1" {
  source = "url: tack-cluster-terraform"
  name = "${var.name}"
  vpc-id = "${module.infrastructure.vpc-id}"
  internal-zone-id = "${module.infrastructure.internal-zone-id}"
  internal-tld = "${var.internal-tld}"
  subnet-ids-private = "${module.infrastructure.subnet-ids-private}"
  subnet-ids-public = "${module.infrastructure.subnet-ids-private}"
  s3-bucket = "${module.infrastructure.s3-bucket}"
  s3-bucket-arn = "${module.infrastructure.s3-bucket-arn}"
}

In case a another need or upgrade I will just add another such as cluster-v2. Given the fact that each module can use another version of the source code, the module can be upgraded easily. I also considering immutable instances. But currently using only tack codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants