SWE482-1903B-01

For this class we are implementing a shoes sales system. We will all need to contribute to the Project Plan,

Table of Contents

Production Environment

To stand up this environment, please fulfill the "pre-reqs before running the first_run.sh script. This can be run locally in a development environemtn as well.

Pre-Reqs

To start the Bundy's environment, there are some expectations.

  • CentOS 7
  • Access from the internet to this host on port 8080 and 6060
  • SSH Access
  • System has access to the internet (github.com and docker.com)
  • Account has ability to install packages on the system (for now, just run as root)

Installation Process

Once the expectations are fulfilled, the first_run.sh script can be run to start the stack.

Development Environment

The minimal environment needed to interact with the Bundy's Program is having Go installed. You can find download and installation directions here: https://golang.org/dl/

The full working development environment would need Go, Linux or Windows with Docker.

Bundy's GUI

The Bundy's frontend is accessible at: http://96.126.113.120:8080/. Bundy's frontend has been wrote using the most commond frontend languages: JavaScript, HTML, and CSS.

Bundy's API

The Bundy's backend is wrote in the Google Go programming language. The language is very good for API style communication as the standard library has what's needed built in. The backend will present minimal API endpoints to interact with the database.

Bundy's API Help

To see the program "help", move into the bundys directory, then run the following command:

go run bundys.go --help

MySQL Database

Bundy's will interact with a MySQL Database.

Official MySQL Container: https://hub.docker.com/_/mysql

Stand up a MySQL Database

docker run -dit --name mysql -e MYSQL_ROOT_PASSWORD=bundys -e MYSQL_DATABASE=bundys -p 3306:3306 -v mysql:/var/lib/mysql mysql:8.0.17 --default-authentication-plugin=mysql_native_password --skip-mysqlx

Log into MySQL Container

docker exec -it mysql bash

MySQL Common Commands

Login to MySQL database

mysql --user=root --password=bundys --database=bundys
select * from shoes;
INSERT INTO shoes (brand,model,color,size,price,stock) VALUES ("nike", "air force one", "white", 9, 99.99, 0);

References