Skip to content

Sistem Administrator di Ubuntu Server - Container LXC di Ubuntu Server 20

Notifications You must be signed in to change notification settings

agisx/Container-LXC-Ubuntu20Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Container LXC Ubuntu Server

Perancangan container dalam ubuntu server menggunakan linux container atau lxc. Container adalah metode virtualisasi tingkat sistem operasi untuk menjalankan beberapa sistem operasi yang terisolasi satu sama lain dalam satu perangkat atau satu host. Dalam hal ini adalah ubuntu server memiliki beberapa ubuntu server sebagai container didalamnya dan dapat menciptakan lingkungan development maupun production dalam satu perangkat tanpa mengganggu satu sama lain.

List Contents

  1. Teknologi yang Digunakan
  2. Arsitektur Jaringan
  3. Tabel Load Balancing
  4. Vm configuration
  5. Ansible
    1. All Hosts
    2. Laravel
    3. Codeigniter
    4. Wordpress
    5. Yii2
    6. Database

Teknologi yang Digunakan

  1. VM Ubuntu 20.04 (menggunakan metode bridge network, dan static ip)
  2. Nginx
  3. 6 instance LXC ubuntu 20.04 PHP 7.4
  4. 1 instance LXC debian 10 mariadb server
  5. Semua instalasi menggunakan Ansible
  6. kelompok13.fpsas/ menggunakan laravel 8
  7. news.kelompok13.fpsas menggunakan wordpress terbaru
  8. kelompok13.fpsas/product menggunakan YII 2.0
  9. kelompok13.fpsas/app menggunakan Code Igniter 3

Arsitektur Jaringan

Arsitektur Jaringan

Tabel Load Balancing

All Containers

Configuration

Vm Hosts

Windows Hosts

Windows DNS

Ansible

All Hosts

Laravel

Laravel's Ansible
    Vars
    No Var Name Value Explain
    1 git_url https://github.com/laravel/laravel The laravel git
    2 destdir /var/www/html/laravel Destination directory for installation
    3 domain ansible host Get current lxc's object
    4 conf_name_nginx app-laravel8.conf File name
  1. Deploy all laravels' hosts
  2. Laravel's Roles
    1. Install requirement items, add Repository, and clone the laravel's git
      • Delete the files' apt chache
      • Install php7 package requirements
      • Ignore yes to skip the error from lxc's installed yet package
      • Add php repository and add key for php packages
      • Add php repository
      • Install nginx requirements
      • Clone the laravel's git
    2. Setup the server file
      • Copy nginx files template
      • Create the symlink
      • Copy laravel's file config
      • Install composer for laravel
      • Generate the key
      • Change the permission
      • Copy database file
    3. Write up the host in hosts file
    4. Nginx's config file
    5. Database file
    6. The handlers
  3. Run laravel's ansible
  4. The result

Codeigniter

Codeigniter's Ansible
    Vars
    No Var Name Value Explain
    1 git_url https://github.com/aldonesia/sas-ci The ci git
    2 destdir /var/www/html/ci Destination directory for installation
    3 domain ansible host Get current lxc's object
    4 conf_name_nginx ci3_app.conf File name
  1. Deploy all Codeigniters' hosts
  2. Codeigniter's Roles
    1. Install requirement items, add Repository, and clone the Codeigniters's git
      • Delete the files' apt chache
      • Install php7 package requirements
      • Ignore yes to skip the error from lxc's installed yet package
      • Add php repository and add key for php packages
      • Install nginx requirements
      • Clone the ci's git
      • Copy nginx files template
      • Copy database template
    2. Setup the server file
      • Delete another nginx config
      • Create a symlink
      • Write up the host in hosts file
    3. Nginx's config file
    4. Database file
    5. The handlers
  3. Run ci's ansible
  4. The result

Wordpress

Wordpress's Ansible
    Vars
    No Var Name Value Explain
    1 git_url https://github.com/WordPress/WordPress The wordpress git
    2 destdir /var/www/html/wordress Destination directory for installation
    3 domain ansible host Get current lxc's object
    4 conf_name_nginx app-wp5.9.conf File name
  1. Deploy all Wordpress' hosts
  2. Wordpress's Roles
    1. Install requirement items, add Repository, and clone the Wordpress's git
      • Delete the files' apt chache
      • Install php7 package requirements
      • Ignore yes to skip the error from lxc's installed yet package
      • Add php repository
      • Add key for php packages
      • Add php 7 repository
      • Install nginx requirements
    2. Setup the server file
      • Clone the wp's git
      • Copy nginx files template
      • Create the symlink
      • Copy wordpress's file config
      • Write up the host in hosts file
    3. Nginx's config file
    4. wordpress's file config
    5. The handlers
    Vars
    No Var Name Value Explain
    1 full_ip_host Full Ip Get current lxc's ip
    2 ip_host Ip Split ip into list
    3 zone_name ip_host[2] + ip_host[1] + ip_host[0] + in-addr Set name file
    4 last_byte ip_host[3] File name
    4 name_dns news Set dns name
  3. DNS's Roles
  4. 3.0.10.in-addr.arpa template
  5. kelompok13.fpsas template
  6. named.conf.local template
  7. named.conf.options template
  8. resolv.conf template
  9. Run Wordpress and dns's ansible
  10. The result

Yii

Run Yii2's Ansible
    Vars
    No Var Name Value Explain
    1 destdir /var/www/html/ Destination directory for installation
    2 domain ansible host Get current lxc's object
    3 conf_name_nginx app-yii2.conf File name
  1. Deploy all Yii2' hosts
  2. Yii2's Roles
    1. Install requirement items and add Repository
      • Delete the files' apt chache
      • Install php7 package requirements
      • Ignore yes to skip the error from lxc's installed yet package
      • Add php repository
      • Add key and php repository
      • Install nginx requirements
    2. Setup the server file
      • Create a yii project
      • Copy nginx files template
      • Copy database file
      • Create the symlink
      • Change the permission
    3. Nginx's config file
    4. yii's file config
    5. The handlers
  3. Run yii's ansible
  4. The result

Database

Run Database's Ansible
    Vars
    No Var Name Value Explain
    1 username agi username
    2 password password user password to root access
    3 domain lxc_mariadb.dev servername
  1. Deploy Mariadb' hosts
  2. Database's Roles
    1. Install requirement items and setup the db's environment
    2. Create the databases
  3. Database file config
  4. Run mariadb's ansible
  5. The result

About

Sistem Administrator di Ubuntu Server - Container LXC di Ubuntu Server 20

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages