Ansible -2 – Configuration

Ansible configuration file at /etc/ansible/ansible.cfg

[defaults]

# some basic default values…

#inventory = /etc/ansible/hosts              ->   this is hosts are ansible using
#library = /usr/share/my_modules/      -> library
#module_utils = /usr/share/my_module_utils/
#remote_tmp = ~/.ansible/tmp
#local_tmp = ~/.ansible/tmp
#forks = 5
#poll_interval = 15
#sudo_user = root        -> sudo user
#ask_sudo_pass = True
#ask_pass = True
#transport = smart
#remote_port = 22
#module_lang = C
#module_set_locale = False

 

 

Advertisements

Ansible – 1- Setting up environments

We will setup the ansible workspace in AWS we need to create one  ‘ansible-host’ and two node

If you dont setup AWS vpc you can use(dev-prod) cloudformation template https://github.com/apocoder/aws/tree/master/vpc

Lets create the machines

OS: Ubuntu 16.04

connect to ‘ansible-host’ and install the ansible https://github.com/apocoder/aws/blob/master/ansible/install.sh

ubuntu@ip-200-30-136-143:~$ ansible –version
ansible 2.4.3.0

Perfect! we successfully installed the ansible!

 

 

 

 

Docker – 06- CMD and ENTRYPOINT

large_v-trans

CMD and ENTRYPOINT at Dockerfile

CMD wget -O- -q http://google.com

and we can add the entrypoint for parameter

ENTRYPOINT [“wget”,”-O-“,”-q”]

if we want to set default parameters we must be use entrypoint and cmd together

ENTRYPOINT [“wget”,”-O-“,”-q”]

CMD wget -O- -q http://google.com

Build and run

docker build-t getsite .

docker run getsite http://facebook.com

if you want to pass the entrypoint parameter with run

docker run -it –entrypoint bash getsite

NodeJS Lesson -1 What is nodejs?

nodejs-logo

Node.js is an open source, cross-platform runtime environment for server-side and networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, Linux, FreeBSD, NonStop and IBM i.

Node.js provides an event-driven architecture and a non-blocking I/O API that optimizes an application’s throughput and scalability. These technologies are commonly used for real-time web applications.

Node.js uses the Google V8 JavaScript engine to execute code, and a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in library to allow applications to act as a Web server without software such as Apache HTTP Server or IIS.

Node.js is gaining adoption as a server-side platform and is used by Microsoft,Yahoo!, Walmart,Groupon,SAP,LinkedIn,] Rakuten, PayPal, Voxer, and GoDaddy.