Showing posts with label container. Show all posts
Showing posts with label container. Show all posts

Monday, March 28, 2022

AWS Containers - ECS (Elastic Container Service)


ECS is a cluster created on the AWS environment for supporting container services. Container services can be implemented using Fargate which is a serverless solution or using EC2 instance-based solution. 

1. Create a FARGATE cluster.

Step 1: Select ECS service and Click on Get Started.

Step 2: Here we need to create container, task, service, cluster definitions

Step 3: For container:

  • Select nginx application.

Step 4: For task:

  • If you want to change the task definition then click on Edit button and make the changes like name of the task or Memory and CPU, etc. 

Step 5: Click on Next button

Step 6: For service:

  • Define service and keep the configuration as it is (if you want to change the configuration then click on Edit button) 

Step 7: click on next button.

Step 8: Cluster definitions:

  • Provide cluster name
  • This will auto create a VPC for you so ensure your VPC space is avaialble (only 5 VPC per region).

Step 9: Click on next

Step 10: Review and click on Create button.

Step 11: Click on View Service Button.

Step 12: Click on Task tab

Step 13: Copy the public IP 13.55.68.139 and browse it in the browser and you should be able to see the nginx web page.

Step 14: Delete the cluster 
when you delete this cluster, the ECS resources such as VPC will be auto deleted.

Wednesday, February 23, 2022

ASSIGNMENT: Docker Container *IMPORTANT

 

Assignment


1. Create a container called webserver with ubuntu docker image.
2. Install apache server in the container(webserver)
3. Start apache service in the container
4. Access apache default page on the web browser
5. Create a new webpage myapp.html on the host machine and copy it to /var/www/html folder in webserver container.
6. Access myapp.html page on the browser
7. Check how much memory and cpu is consumed by web server containers.
8. Stop the container and verify that you are not able to access apache website on browser.
9. Start container and now you should be able to access the apache website.
10. Remove  webserver container

EXAMPLES: Docker Container




DOCKER CONTAINERS

Applications like Microservices, WebApp, DbApp, etc are deployed on containers.

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. 


DOCKER CONTAINER COMMANDS

Find help for all the commands related to container
        
        docker container --help

Find help for a specified command of container ( In below example I am searching the options available for docker container ls command)

        docker container ls --help

Fluentd

Open-source log data collector > why logs? - for compliance (auditing, company, business) - for security (transparency, monitoring, admin...