Docker PPT 2
Docker PPT 2
Docker PPT 2
Docker Swarm
Scalability
Let us, for a moment take a step back and discuss why we want to
scale applications.
The main reason is high availability. Why do we want high
availability?
We want it because we want our business to be available under
any load.
The bigger the load, the better (unless you are under DDoS). It
means that our business is booming.
With high availability our users are happy.
Scalability
We all want speed, and many of us simply leave the site if it takes
too long to load.
We want to avoid having outages because every minute our
business is not operational can be translated into a money loss.
What would you do if an online store is not available? Probably
go to another.
Maybe not the first time, maybe not the second, but, sooner or
later, you would get fed up and switch it for another.
Docker Swarm Mode
Scaling Services
Scaling Services
So instead of setting the MySQL Root Passwords in clear text, you will
create the secrets, then in your docker-compose file, you will reference
the secret name.
Deploy MySQL with Docker Secrets
Connect to MySQL
[root@node2 ~]# docker exec -it $(docker ps -f name=apps_db -q) ls
/run/secrets/
View the actual value of the db_root_password:
[root@node2 ~]# docker exec -it $(docker ps -f name=apps_db -q) cat
/run/secrets/db_root_password
Deploy MySQL with Docker Secrets
Connect to MySQL
[root@node2 ~]# docker exec -it $(docker ps -f name=apps_db -q)
mysql -u root -pn/NYsdJ5KWptJkxs
Create a database for test purpose
mysql> create database suresh ;
mysql> exit;
Deploy MySQL with Docker Secrets
Now open the web browser and access the following URL:
Deploying Wordpress and MySQL to Docker swarm
http://192.168.191.128:80
And complete the Installation
Deploying Wordpress and MySQL to Docker swarm
Deploying Wordpress and MySQL to Docker swarm
Deploying Wordpress and MySQL to Docker swarm
Deploying Wordpress and MySQL to Docker swarm