-1

I have recently been reading more about infrastructure as a service (IaaS) and platform as a service (PaaS) and had some questions. I see when we opt for a PaaS solution, it is generally very easy to create the infrastructure as the cloud providers handle that for us and we can even automate the deployment using an infrastructure as code solution like Terraform.

But if we use an IaaS solution or even a local on premise cluster, we lose a lot of the automation it seems that PaaS allows. So I was curious, are there any good tools out there for automating infrastructure deployment on a local cluster that is not in the cloud?

The best thing I could think of was to run a local Kubernetes cluster and then Dockerize each of the infrastructure components, but this seems difficult as each node in the cluster will need its own specific configuration files.

From my basic Googling, it seems like there is not a good solution to this.

Edit:

I was not clear enough with my original intentions. I have two problems I am trying to solve.

  1. How do I automate infrastructure deployment locally? For example, suppose I wanted to create a Hadoop HDFS cluster. I would need to configure one node to be the namenode with an accessible IP, and the other nodes to be datanodes that are aware of the namenode's IP. At the moment, I have to do this manually by logging into each node, checking it's IP, and then configuring each one. How would I automate this? If I were to use a Kubernetes approach, how do I specify that one of the running pods needs to be the namenode and the others are datanodes? How do I find the pods' IPs and have them be aware of the namenode IP?
  2. The next problem I have is very similar to the first, but a slight modification. How would I deploy specific configuration files to each node. For instance in Kafka, the configuration file for one node, requires the IPs of the Zookeeper nodes, as well as the IP it should listen on. This may be different for every node in the cluster. Is there a good way to make these config files pod specific, so that I do not have to do bash text processing to insert the correct contents into each pod's config files?
nick2225
  • 527
  • 5
  • 17
  • 1
    Not really clear what you're looking for... CrossPlane, OpenStack, Bare-metal k8s, Puppet/Ansible/Chef, VMWare-solutions all exist for a reason to solve most of this – OneCricketeer Jul 26 '21 at 15:11

1 Answers1

2

You can use Terraform for all of your on-premise Infra. Automation, and Ansible for configuration management.

Let's say you have three HPE servers, Install K8s or VMware on them using Ansible, then you can treat them as three Avvaliabilty zones in one region, same as AWS. from this you can start deploying dockerize apps, or helm charts using Terraform.

Summary:

  • Ansbile for installing and configuration K8s.
  • Terraform for provisioning K8s.
  • Helm for installing apps on K8s.

After this you gonna have a base automated on-premise Infra.

  • Terraform will integrate nicely with Helm, which allows you to deploy Helm charts as Terraform Modules, make it much easier to integrate into a CICD pipeline, Also, Terraform will provision other network devices like Firewalls and Loadbalncers – Mohammed Almusaddar Jul 27 '21 at 06:40