How to install Ansible


 

root@aryan-VirtualBox:~# apt-add-repository ppa:ansible/ansible
Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

http://ansible.com/
More info: https://launchpad.net/~ansible/+archive/ubuntu/ansible
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]

 

root@aryan-VirtualBox:~# apt-get install ansible
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
python-httplib2 python-jinja2 python-markupsafe python-paramiko
python-pyasn1 python-yaml sshpass
Suggested packages:
python-jinja2-doc python-gssapi
The following NEW packages will be installed:
ansible python-httplib2 python-jinja2 python-markupsafe python-paramiko
python-pyasn1 python-yaml sshpass
0 upgraded, 8 newly installed, 0 to remove and 10 not upgraded.
Need to get 4,369 kB of archives.
After this operation, 36.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]

provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket


provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/_ping: dial unix /var/run/docker.sock: connect: permission denied

 

aryan@aryan-VirtualBox:~/docker$ terraform plan
Refreshing Terraform state in-memory prior to plan…
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
————————————————————————

Error: Error running plan: 1 error(s) occurred:

* provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/_ping: dial unix /var/run/docker.sock: connect: permission denied
aryan@aryan-VirtualBox:~/docker$

try it with sudo command

aryan@aryan-VirtualBox:~/docker$ sudo terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

+ docker_image.image_id
id: <computed>
latest: <computed>
name: “ghost:latest”
Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only ‘yes’ will be accepted to approve.

Enter a value: yes

docker_image.image_id: Creating…
latest: “” => “<computed>”
name: “” => “ghost:latest”
docker_image.image_id: Still creating… (10s elapsed)
docker_image.image_id: Still creating… (20s elapsed)
docker_image.image_id: Creation complete after 20s (ID: sha256:f32905852788d222be7b05357a906cf9…2f50b7cea5a0ecf229d892d9d9ghost:latest)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
aryan@aryan-VirtualBox:~/docker$

Steps to install terraform on Ubuntu / Ubuntu cloud server :


  1. Install unzip
    sudo apt-get install unzip
    
  2. Download latest version of the terraform
    wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
    
  3. Extract the downloaded file archive
    unzip terraform_0.11.13_linux_amd64.zip
    
  4. Move the executable into a directory searched for executables
    sudo mv terraform /usr/local/bin/
    
  5. Run it
    terraform --version

 

aryan@aryan-VirtualBox:~$ sudo apt-get install unzip
[sudo] password for aryan:
Reading package lists… Done
Building dependency tree
Reading state information… Done
unzip is already the newest version (6.0-21ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
aryan@aryan-VirtualBox:~$ wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
–2019-05-03 11:59:38– https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
Resolving releases.hashicorp.com (releases.hashicorp.com)… 151.101.1.183, 151.101.193.183, 151.101.129.183, …
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.1.183|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 21128942 (20M) [application/zip]
Saving to: ‘terraform_0.11.13_linux_amd64.zip’

terraform_0.11.13_l 100%[===================>] 20.15M 69.3MB/s in 0.3s

2019-05-03 11:59:38 (69.3 MB/s) – ‘terraform_0.11.13_linux_amd64.zip’ saved [21128942/21128942]

aryan@aryan-VirtualBox:~$ unzip terraform_0.11.13_linux_amd64.zip
Archive: terraform_0.11.13_linux_amd64.zip
inflating: terraform
aryan@aryan-VirtualBox:~$ sudo mv terraform /usr/local/bin/
aryan@aryan-VirtualBox:~$ terraform –version
Terraform v0.11.13

INSATALLATION PROCEDURE OF IPFS IN UBUNTU PLATFORM


Step 1: Download the Prebuilt IPFS Package

Visit the IPFS installation page at https://ipfs.io/docs/install/ and download the prebuilt ipfs binaries for your operating system.

Why does the installation page talk about “Go IPFS”? There are multiple implementations of the IPFS protocol. The core IPFS team maintain implementations in Golang and Javascript. Those are commonly referred to as go-ipfs and js-ipfs. The official binaries are built from the Go implementation.

Step 2: Unzip the Prebuilt Package

The binaries for Mac OSX and Linux are in a gzipped tar format (.tar.gz). The binaries for Windows are in a zip file. Use the appropriate tool to unzip the file. There are some hints on

https://ipfs.io/docs/install/ under the heading Installing from a Prebuilt Package

This will create a directory called go-ipfs.

The file named ipfs is your executable ipfs binary.

Step 3: Install the IPFS Binary on your executable path

To install the binary, all you need to do is put the ipfs binary file somewhere on your executable PATH.

Note about permissions: Whichever approach you use to install the binary, make sure you have the necessary permissions. On Mac OSX or Linux, you probably want to use sudo, which is already installed on most systems.

If you’re on Mac OSX or Linux, you can use the provided install script by running.

Read the output from running this. If it complains about being unable to write the file, you need to deal with permissions (see the note above about permissions)

Step 4: Display the IPFS version

When you’re troubleshooting, it’s important to know which version of ipfs you’re using. To find out the current version, run

Step 5:Initialize the Repository

Use the ipfs init command to initialize the repository. This will generate a local ipfs repository for the current user account on your machine. It also generates a cryptographic keypair that allows your ipfs node to cryptographically sign the content and messages that you create.

Note:If you have already initialized ipfs on your machine, you will get an error message like:

This is ok. It means you’ve already done this step. You can safely proceed to Step 6.

Step 6: Use IPFS to explore the post-install documentation

If you installed a different version of ipfs, you may have gotten a slightly different path to use here. Either path will work for this tutorial. The path you got from the ipfs init command will give you documentation that’s accurate for the version of ipfs you’re using.

When you ran ipfs init, it provided a hint for how you can get started. It said:(refer step 5)

 

This ipfs cat command tells ipfs to read the content matching the path you provided. If the content isn’t available locally, ipfs will attempt to find it on the peer-to-peer network.

Run the ipfs cat command with the path you got from the init message:

You should see something like this:

How To Install and Configure Redis on Ubuntu 16.04


Introduction

Redis is an in-memory key-value store known for its flexibility, performance, and wide language support. In this guide, we will demonstrate how to install and configure Redis on an Ubuntu 16.04 server.

Prerequisites

To complete this guide, you will need access to an Ubuntu 16.04 server. You will need a non-root user withsudo privileges to perform the administrative functions required for this process. You can learn how to set up an account with these privileges by following our Ubuntu 16.04 initial server setup guide.

When you are ready to begin, log in to your Ubuntu 16.04 server with your sudo user and continue below.

 

Read more about how to install and configure Redis on Ubuntu