3

I'm trying to create a production-ready Openshift Origin environment in AWS. I have experience with Kubernetes and CoreOS and kube-aws just makes things easy. You generate assets, run CloudFormation template and you are all set. Nodes with userdata are set up in an autoscaling group. Now if I want to do something similar with OpenShift Origin, how do I do that? Sure I want HA as well. Any working guides to get an idea? Running ansible every time to provision a new node just doesn't work for me. A node should bootstrap itself during a boot-time. Thanks

Dmytro Leonenko
  • 456
  • 1
  • 7
  • 24

1 Answers1

3

Amazon provides a CloudFormation template to deploy OpenShift Container Platform on AWS.

Note that deploying OpenShift requires more than just OpenShift, as you need to take into account more components provided by AWS:

  • An Amazon Virtual Private Cloud (Amazon VPC) with two subnets (private and public)
  • NAT gateway to enable instances in the private subnet to connect to the Internet
  • A master node, which hosts the Red Hat OpenShift control components
  • Two cluster nodes, which host the kubelets and Docker services
  • A virtual network computing (VNC) enabled bastion host for additional security

The CloudFormation template and the documentation refers to OpenShift Enterprise, but Origin can be deployed in the same way. It's worth noting that ansible can perform CloudFormation deployments.

The official guide should be your main reference.

Regarding autoscaling the platform, you should take a look at the [ManageIQ project], which is the upstream of Red Hat CloudForms (not to be confused with AWS CloudFormation).

You could automate the deployment of AtomicOS/CentOS on AWS reacting to compute resource consumption triggers, and also run Ansible (Tower only at the moment, if I'm correct) to attach the host to OpenShift Origin from ManageIQ/CloudForms. Automation in ManageIQ is a huge topic in itself.

dawud
  • 15,096
  • 3
  • 42
  • 61
  • Well... it sounds way too complicated. VPC/Subnets are ready. I know kubernetes (plain) will manage ELBs and SGs for me. With k8s it is quite simple to supply the instance with cloud-init script which will connect the node to the cluster having it has proper tags on it. It does seem like if we mentally split two into k8s and openshift, the k8s is relatively simple. But I can't supply OpenShift with an existing k8s cluster, right? – Dmytro Leonenko Oct 21 '16 at 06:53
  • OpenShift _is_ a k8s cluster. – dawud Oct 21 '16 at 07:01
  • I think it is rather a Sugar on top of Kubernetes. But can I really add OpenShift to an existing Kubernetes cluster (not actually running OpenShift on k8s as a container, with doesn't work atm) – Dmytro Leonenko Oct 24 '16 at 15:16
  • OpenShift is an opinionated K8S cluster manager. You can't _add_ it to an already existing kubernetes cluster. OpenShift can be entirely deployed using containers, but again, not on a preexisting k8s cluster, in other words, it is not an addition to k8s. – dawud Oct 24 '16 at 19:53
  • I just found a project that might be of interest to you, I have never used it and I don't know if it works or if it's useful in any way. It does advertise itself as a tool that ["deploys OpenShift Origin to an existing Kubernetes cluster"](https://pypi.python.org/pypi/openshift-under-kubernetes/1.2.9), though. – dawud Oct 25 '16 at 15:44
  • Yeah, I tried that. But currently, OpenShift on Kubernetes is kinda broken. Long story here: https://github.com/openshift/origin/issues/10367#issuecomment-252515516 actually, I tried it before asking the question here. Only after I failed I started to search around and finally asked here – Dmytro Leonenko Oct 25 '16 at 19:47