Giter Club home page Giter Club logo

ajk-simple-sop-installation's Introduction

# Automation SOP AJK Using Ansible

● Current Requirements

No Name Version Function
1 Ansible 2.8.4 or latest Automation tools
2 Python 3.6.8 or latest Running SSH Key Gen script
3 SSHPASS 1.06 or latest Forced using password inline

● Goals

No Name
1 Terminator
2 Chrome
3 VSCode
4 Apache2
5 MySQL
6 Virtualbox
7 PHP
8 Git
9 Tmux
10 pip3
11 npm
12 Node.js
13 Htop

>> Tested on Ubuntu Desktop 18.04 LTS

● Step 1 - Prepare

>> Prepare File Needed
  1. Clone this repository
$ git clone https://github.com/cphikmawan/automation-sop-ajk-using-ansible
  1. Rename hosts.bak to hosts
$ mv hosts.bak hosts
  1. Rename hosts.json.bak with hosts.json
$ mv hosts.json.bak hosts.json
>> SSH Key Gen
  1. Generate ssh-keygen on master host
$ ssh-keygen -t rsa
  1. Copy ssh-key-id to remoted host
$ ssh-copy-id username@host
  1. Try to ssh into remoted host
$ ssh username@host
>> SSH Key Gen With Script

If you want automation using script try to run gen.py

  1. Edit hosts.json with your remoted servers
  2. run gen.py
$ python3 gen.py
  1. Done

● Step 2 - Configuration & Connection

  1. Edit hosts file with remoted server what ever you want, example:
[workstation]
10.0.0.1 ansible_user=cloudy ansible_become_pass=secret
  1. Test connection from master host to remoted host
$ ansible workstation -m ping
  1. Success output
10.0.0.1 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    }, 
    "changed": false, 
    "ping": "pong"
}

● Step 3 - Run The Playbook

  1. Run the playbook
$ ansible-playbook main.yml
  1. Enjoy :)

Additional Example Running Apache2 Service From Website

Requirements
  • Python3
  • Virtualenv
  • Pip3
  • Flask
Step
  1. Install pip3
$ sudo apt install python3-pip
  1. Install requirements
$ pip3 install -r requirements.txt
  1. Change directory to webs
$ cd webs
  1. Edit directory path on app.py
home = 'path/to/directory'
  1. Export
$ export FLASK_APP=app.py
$ export FLASK_ENV=development
$ flask run
  1. Access web on http://localhost:5000/

References

Created with <3 By Cloudy

ajk-simple-sop-installation's People

Contributors

cphikmawan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.