Module-5 Cloud & Infrastructure as a Service (IaaS)

Module-5 Cloud & Infrastructure as a Service (IaaS)

Let's understand the Cloud and Cloud computing:

  • Cloud is a term is used to describe globally available storage and computing resources. It provides a remote and virtualized infrastructure
  • Cloud Computing In general, cloud computing is a "Methodology that enables highly available and quickly scalable resources.
  • A computing methodology that provides services to provision and delivers resources via the Internet. It helps in reducing infrastructure management cost reduction and makes application development and?maintenance easy

Cloud Participants:

  • Cloud Providers: Provides access to cloud infrastructure and resources via Service Level Agreements (SLAs)
  • Cloud Consumer: Who can access the cloud resources to develop and deploy the applications
  • End User: Who uses the application deployed in the cloud, Does not have any knowledge about the?application backend.

What is Infrastructure as a Service (IaaS)?

  • It offers to compute, storage, and networking resources on demand
  • The company buys its own server. You manage your own servers and infrastructure If something breaks, you need to fix it
  • Delegate Infrastructure Management Move your physical infrastructure to the cloud You just rent the servers on demand?

Infrastructure as Service Providers:

  • The most used IaaS Providers are Amazon Web Service (AWS), Microsoft Azure, Google Cloud Platform (GCP)
  • AWS most used one: Powerful, but complex learn
  • For Demo purposes, I'm using Digital Ocean cloud provider


Setup Server on DigitalOcean:

  • Servers on DigitalOcean are called "Droplets"
  • Droplets are Linux-based virtual machines (VMs)

Summary of Steps:

  1. Pre-Requisite: Create a Digital Ocean account (with new signup credits - free tier)
  2. Configure SSH keys
  3. Create a Droplet with Linux Ubuntu distribution
  4. Open SSH port 22 on the server using firewall configuration
  5. SSH into the server using public IP address
  6. Install Java to run the Java application on it

Setup Server on Digital Ocean: To run packaged java application (jar file)

Configure SSH keys: To be able to access any server on Do from a local computer using SSH

No alt text provided for this image

Create Droplet: With Linux Ubuntu distribution

No alt text provided for this image

Open SSH port 22:

  • Open SSH port 22 on the server by creating a new Firewall configuration
  • Inbound Rule = for incoming traffic
  • Outbound Rule = for outgoing traffic

No alt text provided for this image

SSH into the server:

  • By using the public IP address of the server

No alt text provided for this image

Install Java:

  • Once the ssh is on the server, check if java is installed and get installation commands. Just type in the terminal java

No alt text provided for this image

Install java to run the Java application on it

  • Command to install java: apt install openjdk-8-jre-headless

No alt text provided for this image

Run packaged Java Application on prepared Digital Ocean server

  • In the real world, applications will run on a remote server!
  • The server prepared to run the java application jar

Summary of Steps:

  1. Build jar file
  2. Copy to a remote server
  3. Run the application

Build Jar File:

  • I'm using build toll as Gradle
  • Command to execute the build the java application: ./gradlew build

Copy to Remote Server:

  • Command to copy the jar file: scp build/libs/java-react-example.jar [email protected]:/root

Run the application on the Digital ocean server:

  • Command to execute the Java application: java -jar java-react-example.jar

Security Best Practices:

  • Create a separate Linux user on a remote server
  • Every cloud platform configuration for their remote servers is different
  • On droplet, per default, you work with the "root" user
  • Create a new "admin" user
  • Using the "admin" user, create your own users for each application you run (e.g Jenkins, my-app, nexus, Nginx)
  • Give it only the permission it needs to run that application
  • Don't work with the root user!







要查看或添加评论,请登录

Kiran Kumar的更多文章

  • Module-6 Artifact Repository Manager with Nexus

    Module-6 Artifact Repository Manager with Nexus

    Introduction Artifact Repository Manager What is an Artifact Repository? Artifact Repository is a " Storage of build…

  • Module-4 Build Tools & Package Manager

    Module-4 Build Tools & Package Manager

    These are the content I have learned in this module 1. Introduction to Build and Package Manager Tools : What are the…

  • Module-3 Introduction to Version Control

    Module-3 Introduction to Version Control

    These are the content, I have learned in this Module 3 1. Introduction to Version Control Also known as "source…

    1 条评论
  • Module-1 Introduction to DevOps

    Module-1 Introduction to DevOps

    This is the content, I have learned in this Module 1 (Introduction to DevOps) 1. Different IT Roles in Software…

社区洞察

其他会员也浏览了