GithubHelp home page GithubHelp logo

lxdcontaineradmin's Introduction

sad2019-1-team-11

  • Chetan Tuli = Vue.js Frontend.
  • Gaston Vejar = Node.js Backend; LXD Configuration and Setup; mySQL Database Container Configuration and Setup; nginx w/SSL Load Balancer Container Configuration and Setup; nginx w/SSL Web Server Configuration and Setup.

Local Testing Setup:

  • Database setup

    • Create a local mySQL instance.
    • Create database team11cm.
    • Create user 'team11cm' with password 'admin123' and give it full permissions over the created database.
    • Use the scripts in "db-init" to create the tables and populate the initial data in the database.
  • Application

    • Check database connection on dummy_database.js
    • Make sure that the url variable in /public/script/main.js is pointing to 'http://localhost:3000' for local testing.
    • Run dummy_app.js. This will run the app only with database (no lxd) for testing porpuses.
    • Run application through browser at 'http://localhost:3000'.

Production Setup:

  • Local Linux Machine with LXD

    • Install and configure a local instance of LXD.
  • Database Container

    • Create a new container ('sys-database') with an instance of mySQL.
    • Create database team11cm.
    • Create user 'team11cm' with password 'admin123' and give it full permissions over the created database.
    • Use the scripts in "db-init" to create the tables and populate the initial data in the database.
    • Container mySQL configuration example file can be found in server_config/database/mysql.cnf
  • Load Balancer Container

    • Create a new container ('sys-loadbalancer') with an instance of nginx.
    • Container loadbalancer nginx configuration sample file can be found in server_config/load-balancer/nginx.conf.
  • Web Server Containers/Application

    • Create web servers containers ('sys-webserverXX') with an instance of nginx.
    • Container webserver nginx configuration sample file can be found in server_config/web-server/nginx.conf.
    • Check web servers name in the load balancer config file.
    • Copy the application files inside the web server containers.
    • Check database server configuration to database container (from point 1.2) in connections/database.js.
    • Check LXD server configuration to LXD server (from point 1.1) through SSH in connections/lxd.js.
    • Run application through pm2 app.js.
  • Final configurations

    • Create a /etc/hosts rule for 'team11cm.com' to go to the load balancer container ip address.
    • Make sure that the url variable in /public/script/main.js is pointing to 'https://team11cm.com' for production.
    • Run the app through browser at 'https://team11cm.com'.

lxdcontaineradmin's People

Contributors

gastonvejar 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.