• About
  • Disclaimer
  • Privacy Policy
  • Contact Us
Thursday, September 21, 2023
Tech Fashion Web
  • Home
  • Fashion
    • Footwear
    • Culture
  • Technology
    • Tech Solution
    • Website Design
    • Cyber Security
    • Software
  • Business
  • Digital Marketing
    • SEO
    • Social Media
  • Travel
  • Entertainment
    • Music
    • Celebrity
  • Health
    • Food
  • lifestyle
    • Home
  • More
    • Gaming
    • Gadgets
    • Education
    • Electronics
    • Gadgets
    • Reviews
    • Law
No Result
View All Result
  • Home
  • Fashion
    • Footwear
    • Culture
  • Technology
    • Tech Solution
    • Website Design
    • Cyber Security
    • Software
  • Business
  • Digital Marketing
    • SEO
    • Social Media
  • Travel
  • Entertainment
    • Music
    • Celebrity
  • Health
    • Food
  • lifestyle
    • Home
  • More
    • Gaming
    • Gadgets
    • Education
    • Electronics
    • Gadgets
    • Reviews
    • Law
No Result
View All Result
Tech Fashion web
No Result
View All Result
How to manage a Docker Swarm with Portainer

How to manage a Docker Swarm with Portainer

by Tech Fashion
July 26, 2022
in Technology
0
325
SHARES
2.5k
VIEWS
Share on FacebookShare on Twitter


Jack Wallen demonstrates how easy it is to manage a Docker Swarm deployment with Portainer’s web-based GUI.

Image: BalanceFormCreative/Adobe Stock

I’ve said this many times before, and I’ll say it many more times in the future: Portiner is my favorite container management platform. Portiner allows me to perform any task required to manage and monitor container deployments. I can use Portainer on an isolated docker development machine or a multi-node swarm cluster.

Guard. Did I just say multi-node Swarm Cluster? I did.

If your Docker deployments are large scale in nature, chances are you are dealing with a Docker Swarm. For those who don’t know, Swarm Mode is built into the Docker Engine and allows you to manage a cluster of Docker nodes for increased scalability, decentralized deployments, desired state tunings, multi-host networking, load balancing, and rolling updates.

In other words, if your container deployments need to meet higher requirements, you probably use Docker Swarm. And the good news is you can manage your swarm right from Portiner.

TO SEE: Hiring Kit: Back-end Developer (Tech Republic Premium)

If you haven’t implemented Portiner yet, be sure to check it out How to implement the Portainer container management tool with persistent storage before continuing. Make sure you deploy Portiner on your control node and make sure to use the Agent option when creating a new Docker environment (Image A).

Image A

Creating a new swarm environment in Portainer.

After you create your new environment, it should appear in your list of environments (Figure B).

Figure B

My Docker Swarm environment can be found in Portiner.

How to manage your Docker Swarm from Portiner

With your Docker Swarm environment active, select it and you will see the Swarm item in the left sidebar (Figure C).

Figure C

The Swarm item in Portiner’s left navigation.

Click on that entry and you will see two sections: Cluster Status and Nodes (Figure D).

Figure D

My Swarm Cluster overview as seen in Portiner.

Let’s take a look at our dockercontroller node. Click on that item to display the details (Digits E).

Digits E

The details for my Docker Swarm controller node.

As you can see, there are not many items that you can check. What you can do is set the node’s availability (from Active, Pause, Drain) and add labels, which are metadata that describes the node.

Must-read for developers

As for availability, here are the descriptions:

  • Active: A node is active and available for the scheduler to assign tasks.
  • Pause: A node is active, but the scheduler cannot assign new tasks to this node, although existing tasks remain active.
  • Drain: A node is running, but the scheduler cannot assign new tasks and will shut down all existing tasks and reassign them to other nodes.

The Availability option is a very convenient way to manage individual nodes. You may need to replace a node. Instead of just stopping it, empty it so that all tasks are reassigned. You can then deploy the new node and set it as active.

Use labels as a convenient method of organizing your swarm. For example, suppose node 1 is an Ubuntu server and node 2 is an AlmaLinux server. Go to the first node (which, for our example, is hosted on Ubuntu Server) and click + Label. In the resulting window, type os for name and Ubuntu Server for value (Figure F).

Figure F

Adding our first label to a Swarm node in Portainer.

You can add as many labels as you want.

Fix a confusing error

When I first started working with Docker Swarm and Portainer, I discovered a confusing error that took me some time to resolve. When I tried to make a change to a Swarm Node, I got the error:

rpc error: code = Unknown description

Even after restarting every node in the Swarm, I got the same error. On a whim, I checked the time on each server, only to find that node1 and node2 were configured for different time zones. Because of this, the Swarm nodes struggled to communicate with each other. To fix that problem, I logged into the nodes and ran the command:

sudo timedatectl set-timezone ZONE

Where ZONE is the correct time zone for my area which can be found with the command:

cat /etc/timezone

Once you’ve made sure that the time zones for each node are correct, that error should go away and you can label your nodes as needed and set their availability.

Of course you can also scale your implementations within your Swarm with Portiner. To find out how this is done, check out my tutorial Scaling Service Deployments with Portainer.

And that’s all there is to managing your Docker Swarm with Portiner. This platform is a remarkable solution for anyone looking to make managing Docker container deployments a much easier and more efficient process.

Subscribe to TechRepublic’s How to make technology work on YouTube for all the latest technical advice for business professionals from Jack Wallen.



Source link

Share130Tweet81Share33
Previous Post

How Mark Zuckerberg Is Leading Meta Into Its Next Phase

Next Post

Understanding the three levels of IT support in enterprises

Tech Fashion

Tech Fashion

Related Posts

Which tool is best for your business?
Technology

Which tool is best for your business?

by Tech Fashion
March 24, 2023
LG Will Spend $5.5 Billion on a Battery Factory in Arizona
Technology

LG Will Spend $5.5 Billion on a Battery Factory in Arizona

by Tech Fashion
March 24, 2023
Intel Announces New vPro Platform Running on 13th Generation Core
Technology

Intel Announces New vPro Platform Running on 13th Generation Core

by Tech Fashion
March 24, 2023
Beat the roaming charges with this eSIM
Technology

Beat the roaming charges with this eSIM

by Tech Fashion
March 23, 2023
Next Post
Understanding the three levels of IT support in enterprises

Understanding the three levels of IT support in enterprises

How to add a checklist to a Trello card

How to add a checklist to a Trello card

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Categories

  • Business (2)
  • Celebrity (10)
  • Culture (8)
  • Education (8)
  • Entertainment (3)
  • Fashion (12)
  • Food (7)
  • Footwear (7)
  • Health (6)
  • Lifestyle (14)
  • Music (6)
  • Social Media (2)
  • Software (4)
  • Tech Solution (1)
  • Technology (1,884)
  • Travel (12)
  • Website Design (2)

Recent.

Which tool is best for your business?

Which tool is best for your business?

March 24, 2023
LG Will Spend $5.5 Billion on a Battery Factory in Arizona

LG Will Spend $5.5 Billion on a Battery Factory in Arizona

March 24, 2023
Intel Announces New vPro Platform Running on 13th Generation Core

Intel Announces New vPro Platform Running on 13th Generation Core

March 24, 2023
Tech Fashion Web

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Category

  • Business
  • Celebrity
  • Culture
  • Education
  • Entertainment
  • Fashion
  • Food
  • Footwear
  • Health
  • Lifestyle
  • Music
  • Social Media
  • Software
  • Tech Solution
  • Technology
  • Travel
  • Website Design

Recent Posts

  • Which tool is best for your business? March 24, 2023
  • LG Will Spend $5.5 Billion on a Battery Factory in Arizona March 24, 2023
  • Intel Announces New vPro Platform Running on 13th Generation Core March 24, 2023

Contact Us

    © 2021 techfashionweb.com . All rights reserved.

    No Result
    View All Result
    • Home
    • Fashion
      • Footwear
      • Culture
    • Technology
      • Tech Solution
      • Website Design
      • Cyber Security
      • Software
    • Business
    • Digital Marketing
      • SEO
      • Social Media
    • Travel
    • Entertainment
      • Music
      • Celebrity
    • Health
      • Food
    • lifestyle
      • Home
    • More
      • Gaming
      • Gadgets
      • Education
      • Electronics
      • Gadgets
      • Reviews
      • Law

    © 2021 techfashionweb.com . All rights reserved.