OpenStack & CORE Application
The title sort of gives it away but I would like to steal some moments of your time and teach you a little about stacks, about machine allocation and also about CORE, an internal app that reduced application setup from a few days to a few minutes. With CORE we will be able to set up an entire system of applications ready to go in no time at all. Basically using the app a new employee can get to work on his first day at 9:00 AM and have a working environment at 9:05 AM. Pretty cool right?I think so and I had the chance to talk about it in the recent TechTalks session eMAG hosts on a monthly basis.
Stacks, machines and instances
What is a stack?
In short, stack is a bunch of applications that work together, as they would have on the production environment, but with resources and lifespan limited to the needs of development and testing work.
Let’s explain it through an example. Let’s say a developer has to do some tasks on an application, called X. In order to run correctly X he needs also applications Y and Z, so the developer will deploy all 3 of them on 3 separate machines inside the same stack. After he finishes the tasks, he will delete the machines, freeing up the resources. So, a stacks is really just a collection of virtual machines that are interconnected.
But what is a machine you say? A machine, or virtual machine is a virtual computer that runs on your operating system (we call it the host), and it supplies a virtual version of hardware to any guest operating systems. The guest operating system is open like any other program you are used to, in a window. It’s your own virtual playground.
Put it all together and you get CORE, an application we use in eMAG for stack management, and as I mentioned before it drastically reduces setup times, letting you concentrate on making great software. As a nice to know fact, the machines represented in the snip bellow use CentOS 7 and are provisioned with Puppet. You can learn more about Puppet here.
Openstack
Now that we covered some of the basics let get a little into Openstack. Basically Openstack allows users to deploy virtual machines and other instances very fast. It controls large pools of computing, storage, and networking resources throughout a datacenter, managed through a dashboard or via the OpenStack API.
Why is Openstack useful?
- It allows collocating VM’s into projects that have a fixed limit of resources (CPU, RAM, HDD)
- It has Dynamic allocation of VM’s
- It has an easy networking configuration
- Each team can manage its own resources
- It’s allows easy and fast environment creation
Machine allocation and deploy
When the user uses the CORE interface to request a new machine, the allocation process is triggered by an API call made by CORE application to OpenStack API. As soon as the machine is allocated successfully, the CORE interface is updated and the user can continue with step 2, deploying the application.
Scripts are carrying out the execution of the process to install an application on a machine. The scripts are used on different types of environments: testing, development or production.
This process is split in 2 big steps:
- A script that generates a final config file with all the parameters needed for deploy (database hosts, credentials, rabbitmq details, other applications etc.)
- Based on the file created in the previous step, the deploy is run and the application is installed on the server
To conclude, I think that in a fast moving world of business where everyone wants to be the first to deliver, it’s important not to be hung up on details of setting up environments and just let programmers do their thing as fast and as efficiently as possible, and using Openstack makes that possible. It enables developers to deploy services fast and manage them from a single point. What more could you want when all you want to do is code and deliver wonderful products?
Well that’s my take on it but if you really want to know more about CORE, stacks and how it all comes together, why not join eMAG? You can check out job openings here, and who knows, you might be the next guy writing an article about something you are passionate about, right here on TechLabs.