Getting Started with Container Based Deployment

Getting Started with Container Based Deployment

Application life cycle management (ALM) is the process of creating application software and includes many different aspects???such as gathering requirements, architecture and detailed design, implementation, testing, change management, maintenance, integration, release management and deployment. There are different approaches, methodologies and schools of thought for all these aspects. Today, I’m going to focus on release management and deployment. This is the most dynamic and active field where the most innovation happens these days.

Traditionally, large enterprise systems where released very infrequently (within a time scale of months or even years) by dedicated release management teams that often belonged to an operations group, which was organizationally separate from the development group.

Now, the landscape is different. Large systems are composed from a large number of services that interact through APIs that are developed and deployed by semi-independent teams that use DevOps practices (development and operations are mixed).

One of the key technologies that enables this approach is container-based deployment. At the core, containers are very similar to virtual machines in the sense that they allow you to isolate a piece of software, its dependencies and the resources it needs. Multiple isolated containers running on the same physical machines can share the same operating system, which make them much more efficient and lean.

Docker

Docker has a lot of momentum right now and provides an increasingly complete toolchain. Let’s poke around and see what it takes to deploy some software using Docker.

The first step is to install Docker. Follow the instructions here: http://docs.docker.com/installation/

Here is what the MAC OSX Toolbox installer looks like:

The toolbox installs quite a few tools as well as a virtual machine called ‘default. I’ll go over some of the tools later. I work mostly from the terminal to get as close to the action as possible.

The ‘default’ VM is your new home. You can manage multiple VMs using the docker-machine tool, but ‘default’ is good enough for us.

Type: 'docker-machine ls'

You should see something like:

NAME ACTIVE DRIVER STATE URL SWARMdefault virtualbox Running tcp://192.168.99.100:2376

The next step is setting up the environment:

eval "$(docker-machine env dev)" 

That lets you use the ‘docker’ tool to actually work with containers inside the ‘default’ VM.

Type: 'docker ps'

You should see:

CONTAINER ID IMAGE COMMAND CREATEDSTATUS PORTS NAMES

That means no containers are running inside our machine. We will rectify it soon enough. Let’s run a web server. The following command will run nginx in a container listening on port 8080:

docker run -d -p 8080:80 nginx

Verify it worked by typing ‘docker ps’ again. You should see something like:

CONTAINER ID IMAGE COMMANDCREATED STATUS PORTSNAMES3c91a93d4976 nginx "nginx -g 'daemon off" Aboutan hour ago Up About an hour 443/tcp, 0.0.0.0:8080->80/tcpjolly_goldstine

We got nginx running on port 8080 of the VM.

To access it you need to use the VM IP address, which is available through:

docker-machine ip default

Here is how to get the default page from nginx:

curl http://$(docker-machine ip default):8080

The Docker Ecosystem

This was a very rudimentary example of how to bring up a web server ready to go. A complete system is much more than that. Even a simple system will have at least some sort of database for persistent data. Then, you’ll have your application. More sophisticated systems will have multiple services and backend processes running and possibly multiple types of databases and API servers. Each one of these components may have multiple instances. You can create Docker images for each component and then deploy them, but you’ll still need to manage versions properly and hook up the different containers. Deploying such a system is not trivial. Docker provides several tools that can help.

Docker Swarm

Docker Swarm lets you create a cluster of Docker hosts. Each one of these hosts can host multiple Docker containers. This is very important because you get the benefit of isolation between different containers, but you don’t have to dedicate an entire host for a component that may not use a lot of resources.

Docker swarm supports different discovery back ends so the various Docker containers in your cluster can find and interact with each other. Supported back ends include: etcd, Consul and ZooKeeper.

Docker Compose

Docker Compose lets you define multiple services to run on the same host. Each service will run in its own containers and you can link the services in the docker-compose.yml?file. This is very convenient to manage. You can define, build and deploy multi-container applications

Conclusion

The container-based deployment scene is exploding these day with lots of tools for managing it. Docker is a major player. It slowly expands beyond just containers to provide management and orchestration too. Its current offerings are still in Beta, but have a lot of momentum. My recommendation is to keep an eye and experiment with these technologies and tools, but be very careful before you trust them with production systems.

devx-admin

devx-admin

Share the Post:
Poland Energy Future

Westinghouse Builds Polish Power Plant

Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at

EV Labor Market

EV Industry Hurting For Skilled Labor

The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will

Soaring EV Quotas

Soaring EV Quotas Spark Battle Against Time

Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023,

Affordable Electric Revolution

Tesla Rivals Make Bold Moves

Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed

Poland Energy Future

Westinghouse Builds Polish Power Plant

Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at the Lubiatowo-Kopalino site in Pomerania.

EV Labor Market

EV Industry Hurting For Skilled Labor

The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will result in job losses. However,

Soaring EV Quotas

Soaring EV Quotas Spark Battle Against Time

Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023, more than one-fifth of automobiles

Affordable Electric Revolution

Tesla Rivals Make Bold Moves

Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed are at the forefront because

Sunsets' Technique

Inside the Climate Battle: Make Sunsets’ Technique

On February 12, 2023, Luke Iseman and Andrew Song from the solar geoengineering firm Make Sunsets showcased their technique for injecting sulfur dioxide (SO₂) into the stratosphere as a means

AI Adherence Prediction

AI Algorithm Predicts Treatment Adherence

Swoop, a prominent consumer health data company, has unveiled a cutting-edge algorithm capable of predicting adherence to treatment in people with Multiple Sclerosis (MS) and other health conditions. Utilizing artificial

Personalized UX

Here’s Why You Need to Use JavaScript and Cookies

In today’s increasingly digital world, websites often rely on JavaScript and cookies to provide users with a more seamless and personalized browsing experience. These key components allow websites to display

Geoengineering Methods

Scientists Dimming the Sun: It’s a Good Thing

Scientists at the University of Bern have been exploring geoengineering methods that could potentially slow down the melting of the West Antarctic ice sheet by reducing sunlight exposure. Among these

why startups succeed

The Top Reasons Why Startups Succeed

Everyone hears the stories. Apple was started in a garage. Musk slept in a rented office space while he was creating PayPal with his brother. Facebook was coded by a

Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as opposed to the 176% return

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024 approaches, the industry seems to

Elevated Content Deals

Elevate Your Content Creation with Amazing Deals

The latest Tech Deals cater to creators of different levels and budgets, featuring a variety of computer accessories and tools designed specifically for content creation. Enhance your technological setup with

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security. These carefully designed learning courses

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers to better manage smaller unmanned

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like artificial intelligence (AI), semiconductors, and

Huge Savings

Score Massive Savings on Portable Gaming

This week in tech bargains, a well-known firm has considerably reduced the price of its portable gaming device, cutting costs by as much as 20 percent, which matches the lowest

Cloudfare Protection

Unbreakable: Cloudflare One Data Protection Suite

Recently, Cloudflare introduced its One Data Protection Suite, an extensive collection of sophisticated security tools designed to protect data in various environments, including web, private, and SaaS applications. The suite

Drone Revolution

Cool Drone Tech Unveiled at London Event

At the DSEI defense event in London, Israeli defense firms exhibited cutting-edge drone technology featuring vertical-takeoff-and-landing (VTOL) abilities while launching two innovative systems that have already been acquired by clients.

2D Semiconductor Revolution

Disrupting Electronics with 2D Semiconductors

The rapid development in electronic devices has created an increasing demand for advanced semiconductors. While silicon has traditionally been the go-to material for such applications, it suffers from certain limitations.

Cisco Growth

Cisco Cuts Jobs To Optimize Growth

Tech giant Cisco Systems Inc. recently unveiled plans to reduce its workforce in two Californian cities, with the goal of optimizing the company’s cost structure. The company has decided to

FAA Authorization

FAA Approves Drone Deliveries

In a significant development for the US drone industry, drone delivery company Zipline has gained Federal Aviation Administration (FAA) authorization, permitting them to operate drones beyond the visual line of

Mortgage Rate Challenges

Prop-Tech Firms Face Mortgage Rate Challenges

The surge in mortgage rates and a subsequent decrease in home buying have presented challenges for prop-tech firms like Divvy Homes, a rent-to-own start-up company. With a previous valuation of

Lighthouse Updates

Microsoft 365 Lighthouse: Powerful Updates

Microsoft has introduced a new update to Microsoft 365 Lighthouse, which includes support for alerts and notifications. This update is designed to give Managed Service Providers (MSPs) increased control and

Website Lock

Mysterious Website Blockage Sparks Concern

Recently, visitors of a well-known resource website encountered a message blocking their access, resulting in disappointment and frustration among its users. While the reason for this limitation remains uncertain, specialists