Ubuntu operating system 17.04 installation

We can see How to do Ubuntu operating system 17.04 installation in this post.
Step 1 :
Boot the machine using OS media and click on “Install Ubuntu”.

Ubuntu operating system 17.04 installation

Step 2:  Now select the language and click on continue to proceed further.

Step 3:  We could see there are two check box which is mentioning here to enable the “Downloading                 updates while installation and Third party software installation” by checking this two box.

Step 4:  Now in next screen will ask for installation type. On this screen select as per your requirement. I’m going to select “Something else” option and click continue.


Step 5: Select the free space and click on “+”

Step 6:  Provide the required information to create root(/) file system and click ok.

Step 7:  Follow above step to create filesystem whatever you want and here i am create one more directory called “swap”  which doesn’t have filesystem type and it is called as virtual memory as well.

Step 8: Now you could see the created filesystem lists like below.

Step 9:  Click on “Install now” to continue with installation and click continue to confirm the changes.

Step 10: Select the time zone from next screen.

Step 11:  Than select Keyboard layout language.

Step 12:  Provide the username details which we need to create new user and which will help us to manage the system(This is not a default administrator – root) and click continue.

Step 13:  Finally files will be copied from the media to our hard disk and will ask for reboot as a final step.

Now the Ubuntu 17.04 has been installed successfully and ready to use.

Thanks for supporting.

Reference: Ubuntu Docs

Finding files in linux



“Find” command:

This will allow you to find the files/folders within a directory or recursively, that match the searching pattern whichever you are given to search.

#find .

Above command will indicate search in the current directory.

-name: This option will help you to find a file that matches the specific pattern.

And we can use metacharacters like “*”,” ” with enclosure of double quotes “”

Example:

[root@linux etc]# find . -name mtab./mtab

[root@linux /]# find /etc -name passwd/etc/passwd/etc/pam.d/passwd  -> this command will find files for starting like passwd under the /etc directory.

Using the “Locate” command:

     Locate command is faster than find command. Because it’s using a database which is previously built the database for search. Locate command will list all the path names which containing your search pattern.

The database is updated using corn or we can also manually update the database using below command.

#sudo updatedb

Example:

#locate mydata

Application deployment on Kubernetes


Deployment on Kubernetes using Kubectl.

        We can deploy containerized applications on that. To do that, we need to create Kubernetes Deployment. This deployment is responsible for the creating/ updating instance. Once deployment has been created, Kubernetes master will schedule the application instances that the deployment creates onto individual nodes in the cluster.

        Once instance are created, Kubernetes Deployment controller will monitor the application instances continuously. If the instance down or deleted, Deployment monitor will replaces it. This is called self healing, which will help to address machine failure or maintenance.

        In some other cloud technology, installation script will be used to start the applications. But, it will help on recovery from the system failure. In kubernetes will provide different approach by creating and running application instance on different nodes.

     We can create and manage deployment by using Kubernetes Command line Interface (Kubectl). Kubectl will use kubernetes API to connect with cluster.

Kubectl basics:

Downloading Kubectl:

#wget https://storage.googleapis.com/kubernetes-release/release/v1.0.1/bin/linux/amd64/kubectl

Copying kubectl to path:
#chmod +x kubectl
#mv kubectl /usr/local/bin/

Downloading
client credentials and CA cert:


gcloud compute copy-files node0:~/admin-key.pem .


gcloud compute copy-files node0:~/admin.pem .


gcloud compute copy-files node0:~/ca.pem .


Getting Kubernetes controller external IP:


EXTERNAL_IP=$(gcloud compute ssh node0 --command


  "curl -H 'Metadata-Flavor: Google'


http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip")


Creating cluster config:


kubectl config set-cluster workshop


--certificate-authority=ca.pem


--embed-certs=true


--server=https://${EXTERNAL_IP}:6443


Adding a admin credentials:


kubectl config set-credentials admin


--client-key=admin-key.pem


--client-certificate=admin.pem


--embed-certs=true


Configuring the cluster context:


kubectl config set-context workshop


--cluster=workshop


--user=admin


kubectl config use-context workshop


kubectl config view


Explore the kubectl CLI


Checking health status of the cluster components:


kubectl get cs


List pods:


kubectl get pods


List nodes:


kubectl get nodes


List services:


kubectl get services


"Kubectl run" command will create new deployment and have to provide deployment name,


application image location and port number.




Example:
#kubectl run kubernetes-bootcamp --image=docker.io/jocatalin/kubernetes-bootcamp:v1 --port=8080


command to display the deployment:
> kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILA
BLE AGE
kubernetes-bootcamp 1 1 1 1
2m

In default case deployed applications are visible inside of kubernetes cluster, before exposing.
To view the application without exposing outside, can add route between our
terminal and kubernetes cluster using proxy.
>kubectl proxy
Started proxy enables access to the API. The applications running inside the pod.
Get the pod name and store it in the POD_NAME environment variable.


>export POD_NAME=$(kubectl get pods -o go-template –template ‘{{range .items}}{{.metadata.name}}{{“n”}}{{end}}’) echo Name of the Pod: $POD_NAME


command to see application output:

>curl http://localhost:8001/api/v1/proxy/namespaces/default/pods/$POD_NAME/



Note: Will see more application related things in future post.

About amazon EC2

  Provides scalable computing and Will reduce the Hardware investment. You can develop and deploy applications faster as you can.We can configure security, networking and storage.

Features of AWS EC2:

Virtual computing environments ( Instance)
Preconfigured templates for instance (Amazon MACHINE IMAGES)
Secure login for your instance (Amazon stores public key and you store the private key)
AMI Templates are used when launching the machine.
high memory, availability, on domain instances, reserved instance for a particular time, cost instances.

Instance types:

General purpose            –  t software development
Compute optimised         –  c High performance
Memory optimised          – r  DBs
Storage optimised           –  i or d
GPU Instances – g (Video encoding)

Launch Instance -> AMIs -> types (VCPUs) -> Storage -> NW Performance -> Additional Info (Tags)