GithubHelp home page GithubHelp logo

jimmywang54 / moviebookingsystem Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 5.22 MB

HTML 1.41% CSS 0.54% JavaScript 16.93% Dockerfile 0.35% Objective-C 43.61% Shell 1.89% Ruby 0.03% Batchfile 1.11% Java 21.77% Groovy 0.67% TSQL 11.70%

moviebookingsystem's Introduction

Movie Ticket Reservation System

To run locally for development

Install MySql Server

Install the MySQL server by using the Ubuntu operating system package manager:

sudo apt-get update
sudo apt-get install mysql-server

The installer installs MySQL and all dependencies.

If the secure installation utility does not launch automatically after the installation completes, enter the following command:

sudo mysql_secure_installation utility

Set the password as "root".

This utility prompts you to define the mysql root password and other security-related options, including removing remote access to the root user and setting the root password.

After the installation is complete, you can start the database service by running the following command. If the service is already started, a message informs you that the service is already running:

sudo systemctl start mysql

To ensure that the database server launches after a reboot, run the following command:

sudo systemctl enable mysql

Restart the mysql service.

sudo systemctl restart mysql

Start the MySql shell:

sudo mysql -u root -p

Enter password as "root" when prompted.

The following mysql shell prompt should appear:

mysql>

Run the following to use MySql without sudo:

mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
mysql > FLUSH PRIVILEGES;
mysql > CREATE DATABASE csye7220;
mysql > exit

Run the backend microservice

  1. Click here to Download Spring Tools Suite (STS IDE)
  2. Open the backend-microservice and security-backend-microservice project in STS
  3. Run it as a Springboot Application

Run ReactJS front end

  1. Make sure you have node and npm installed. Click here and follow the instructions to install the latest versions
  2. Open a terminal and navigate inside the directory recipe-frontend
  3. Run npm run install-deps to install all the dependencies
  4. Run npm run start-dev
  5. Now open your browser and go to http://localhost:8080
  6. Now, you should be able to see a home page at http://localhost:8080

To run on kubernetes cluster on AWS

Requirements

  1. AWS account
  2. aws-cli
  3. kops
  4. ansible
  5. helm(version 2.16.6)
  6. python-pip
  7. boto3
  8. boto
  9. kubectl
  10. openshift

NOTE

This project was developed on an ubuntu 18.04 system. It supports every major OS, provided the above requirements are fulfilled. Though it is recommended to use a UNIX based OS (especially ubuntu 18.04).

In order to simplify the process of meeting the requirements, we have a install-dependencies.sh bash script to install all the depending tools. Follow the steps below:

  1. Create an s3 bucket on AWS named <your-bucket-name>
  2. Navigate to the root of this project in your terminal
  3. Run ./install-dependencies.sh
  4. It will prompt you to enter the name of your s3 bucket <your-bucket-name>(that you have to create for kops to work. This is mentioned in the 1st step)
  5. The last step in the script is AWS configuration, hence, you will be prompted to enter your AWS access key, AWS access key ID, default region (recommended: 'us-east-1') and default output
  6. If you have followed this, you can skip to step 2 in the next section

Start Cluster and app using the ansible-playbook

  1. Create an s3 bucket on AWS named <your-bucket-name>
  2. Open terminal and navigate to infrastructure directory
  3. Run the following command to start the kubernetes server on AWS
    ansible-playbook main.yaml --extra-vars "command=start cluster_name=k8s.local kops_state_store=s3://<your-bucket-name>"
  4. Run the following command to note down the password for your grafana dashboard
    kubectl -n grafana get secret grafana -o json
    Note that this is a base64 encoded string, use any tool to decode it and note it down
  5. Run the following command to view the external IPS of your 3 apps - frontend, frontend-post and grafana
    kubectl get svc --all-namespaces
  6. Note the URLs for the LoadBalancer created for all three of your Apps
  7. Open these URLs in your browser
  8. For the grafana dashboard, use the username as admin and for password use the decoded string from step 4

Delete the created cluster and free your resources when done using

  1. Open terminal and navigate to infrastructure directory
  2. Run the following command to delete the kubernetes server on AWS
    ansible-playbook main.yaml --extra-vars "command=delete cluster_name=k8s.local kops_state_store=s3://<your-bucket-name>"

moviebookingsystem's People

Contributors

jimmywang54 avatar

Watchers

 avatar  avatar

Forkers

epasham

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.