Getting back ‘depends_on’ in docker-compose
Skopos Continuous Deployment lets you maintain your service dependencies while moving traditional apps to Docker

Getting back ‘depends_on’ in docker-compose

Traditional enterprise apps are architected in a way that don’t always comply with the ‘perfect’ microservices architectures we expect to see with "Dockerized" apps. For example, Docker expects services to be stateless and self-configuring whereas traditional apps are often stateful and require external configuration after setup.

Being able to identify dependencies between containers and set a start-order is often required for complex systems to be migrated to Docker, however with the release of docker-compose v3, some of the features that helped make this possible are no longer available.

For example, many developers have used the depends_on configuration option in their docker-compose file to set a start-order but based on the Docker documentation (picture right), depends_on not only doesn’t wait for other services to start but it’s also been deprecated in docker-compose version 3.

In addition, alternative tags such as  external_links or links are either not supported or are recommended against. Because of this challenge, our team put together a few features in Skopos to make setting the start-order during deployment or update possible.

Here’s how you can try this out:

Step 1: Run the Skopos container on your Docker host or swarm manager node

docker run -d -p 8100:8100 --restart=unless-stopped -e skstkn=dependsli --name skopos -v /var/run/docker.sock:/var/run/docker.sock opsani/skopos:edge


 
  

Step 2: Open your browser to http://localhost:8100 (if on a remote machine, replace “localhost” with the host name or IP address)

Step 3: Choose an option to get started…

  • Discover Existing Applications — if you already have an application running, Skopos will scan your Docker registry and produce a visual of your architecture.
  • Import a Docker Compose File — if you have an existing compose file you can import it to Skopos and Skopos will produce a visual of your architecture.
  • Use Our Demo App — if you don’t want to try this on your existing system, you can pull our demo app from GitHub and use it to test out this feature.

Step 4: App List

Once your app(s) is(are) in Skopos, click on the app name to view the architecture.

Step 5: View the Application Architecture 

The next screen shows you your application architecture. From here, you can edit the application to identify dependencies by clicking the “Edit” button at the top of the screen.

Step 6: Identify Start-Order

Drag the arrows to identify order in your app. Note that the items to start first are on the right. Example in the graphic below, I made NGINX dependent on the ‘vote’ container.

Click on the arrow to identify the connection strictness (Strict, Tolerant or Independent).

Save your changes and change to “Deploy” mode to deploy the changes.

7. View Your Deployment Plan and Start the Deployment

Click the “Switch to Plan” button to see the deployment plan before you start. You can drill in on each step to see the details and also view the automated rollback plan.

Click the Start button to begin your deployment. Skopos will deploy your application with all the dependencies you’ve identified.

8. Export your Compose File

You may want to export this application architecture as a Docker-compose file to save it to your source repository for future use. To do that, click the { } button, and select “Compose File”.



I hope you find value in this new feature to help you identify and deploy your application with start-order dependencies. Let me know in the comments below what else you’d like to see in Skopos.

If you’d like to learn more about Skopos, start here.

To view or add a comment, sign in

More articles by Stefana Muller

  • Déjà Vu in the Digital Age: Why AI Coding is the New "Rogue IT"

    In the early 2000s, a decentralized tech movement swept through corporate America: "Rogue IT" (also known as Shadow…

    11 Comments
  • Level Up Together: Invitation to Join an Inclusive Group Mentoring Series

    For those who follow my work, you know I'm a big believer in the power of community and mentorship, especially when it…

    4 Comments
  • The CALMS Model: Assessing Your Readiness for a DevOps Transformation

    If you’re considering beginning a DevOps transformation, we recommend starting by identifying where you are now and…

    4 Comments
  • 4 DevOps Myths Debunked

    DevOps is a set of cultural values and organizational practices that improve business outcomes by increasing…

    1 Comment
  • A DevOps Transformation Overview: What, How, Who, and Why

    When your organization needs to address a specific problem, change the status quo, follow new trends, add a premier…

  • Gaining Buy-In on DevOps

    Understanding what DevOps means and brings to the business is critical in order to gain buy-in at the beginning of the…

    4 Comments
  • Podcast Guest Tips

    Tips and tricks to prepare for your first podcast interview. Over the past 2 months, I've joined in as a guest and as a…

    2 Comments
  • Fully-Managed DevOps – Is It Possible?

    If you’re in a development or operations role, you probably gawked at this title. The truth is, having some other…

  • 10 Tips for Your First DevOpsDays NYC

    This year I have the privilege of being part of the organizing committee for DevOpsDays New York City. It's been an…

  • Demystifying DevOps

    Blog originally posted on 2nd Watch blog. My second week at 2nd Watch, it happened.

    1 Comment

Others also viewed

Explore content categories