Skip to content

Accessing the Development Stack

Bryce Hofstrom edited this page Apr 22, 2024 · 46 revisions

Development Stack Access Instructions

This page contains all of the necessary information for accessing each portion of the development stack. Apart from tutorials on access, each section will describe typical actions or tasks that can be accomplished using each portion of the stack. Please refer to the necessary sections below to learn more about each portion of the stack.


Amazon Services

Listed below are tutorials for accessing each portion of our custom Amazon environment. In order to begin, it's important to first have access to an AWS account. For the sake of this tutorial, an IAM account has been created already for members of the Tool Shed to use. To login to AWS, please head to the Amazon Web Services' Login Page. From here, click on the IAM User option. IAM Sign In Part 1 Within the text box labeled "Account ID (12 digits) or account alias", enter the following number: 939999126413. This value is associated to the root user account for The Handymen's Amazon environment. Once this is entered, press the "Next" button. IAM User Sign In Part 2 From here, sign in as the following pre-created user. Make sure all credentials are entered EXACTLY as they appear below:

  • Username: seactoolsheduser
  • Password: SeacToolShed!

After typing in these credentials, log in, and, after verification, Congratulations! You're now signed into The Handymen's custom AWS environment! You should see a dashboard similar to the following below:

AWS Dashboard

From this dashboard, you'll be able fully access each part of the AWS environment. In subsequent sections, more detail will be revealed regarding each AWS technology used in this application.

Amazon Lightsail

Amazon Lightsail is A Virtual Private Service (VPS) provider currently hosting both our web application and database system. The following instruction will guide you through how to access and manage your Lightsail instance. To reach the AWS Lightsail dashboard, a few options are available. Near the top of the AWS dashboard, a search bar appears. In the search bar, you can type "Lightsail" to travel to the dashboard. Additionally, Lightsail has been added as a favorite service, meaning it now is pinned below the search bar. Pressing this button will also allow you to reach the Lightsail dashboard.

Lightsail Search

Lightsail Node.js Instance

The Amazon Node.js instance is the server currently hosting the web application.

Lightsail MySQL Database

Amazon Lightsail also supports the MySQL database storing all user, tool, and transaction information. To get more information regarding the structure of the database, please visit the Database Schema Information page page. In order to access your current database instance, press the "Databases" tab near the left side of the dashboard.

Lightsail Database

Once clicked, you'll be able to see the Lightsail database named "SEAC-Tool-Shed-Database". To gain more information about this database instance, click on the database name. Here, the Lightsail database can be managed. There are a number of tabs which contain important information regarding the current database instance.

Connect

Database Dashboard

On the "Connect" page, a number of important areas are highlighted above. In green, we can see a number of important metrics related to the database including system memory, the number of CPUs, and total storage. Here, we can also stop or reboot our database instance. In blue, we can see login information for how to connect to the database through secure shell (SSH) or other means. More on this will come later when using MySQL Workbench. Lastly, in red, we can see the database endpoint and port. These will be used in our application code in order to connect and make calls to the database to lookup, insert, delete, and update any data.

Logs & History

On the "Logs & history" page, metrics regarding error logs. Additional logs can be enabled; however, this may impact read and write performance of the database and as a result, these logs are currently disabled. They can be re-enabled at any time.

Metrics

The "Metrics" page contains a graph viewer where you can observe the performance of the database system. These metrics include CPU utilization and Database connections. More reports can also be observed. Lastly, if needed alarms can be added which can be customized to send emails or text messages when certain criteria related to the database is met such as low memory or low storage.

Networking

The "Networking" page to modify network security related to your database instance. To ensure all users are able to access your database, the networking option slider must be set to allow public access. This will ensure all users can properly access all applicable system information stored here.

Snapshots & restore

The "Snapshots & restore" page allows you to manually create database backups. Additionally, the emergency restore feature allows you to restore your database to from. The database status and data is also captured on a weekly basis.

Tags

The "Tags" page uses tags to filter and organize your resources in the Lightsail console. Our Lighsail instance doesn't use tags and as such, this tab should be avoided.

Delete

The "Delete" pages allows those with access to delete the database. WARINING - If this button is pressed, all database data will be deleted with no guaranteed recovery! Proceed with caution with this option.

Lightsail Networking

IAM

Amazon S3

Programming Languages


Node.js

Node.js is the programming framework used power our entire application. With Node.js, our team is able to not only create carefully layer web pages, but we are able to handle all logical calls needed to our database systems. In order to install Node.js, first travel to the Node.js releases page. Here, download the file named NodistSetup-0.10.3.exe. Once this file is installed, run through the installer wizard to install Node.js. Once complete, Node.js will be installed on your machine.

CSS

Cascading Style Sheets are a styling language used to apply designs to HTML based websites. Because we are using Node.js, a JavaScript framework with support for structuring HTML, CSS can be applied to pages. There is no installation dependency for CSS. Instead, CSS files are present throughout our application directories or folders.

Python

Python is a programming language used in our application in order to streamline the data migration process. As such, a number of Python scripts were developed in order to migrate user accounts and tool information. To run these scripts, Python must first be installed. To install Python, travel to the Python Site, choosing to install the latest release version (as of this tutorial, Python 3.12.3). Once downloaded, run through the installer wizard. After completing the installation wizard, Python will be ready to use.

MySQL

MySQL is the programming language of choice used to create database tables, attributes, queries, and, is what's ultimately used to called to find database data. Installing MySQL will be needed in order to view our database tables when using the MySQL Workbench software. To begin with installation, travel to the MySQL Community Server page. Here, download the most recent version (as of the making of this tutorial 8.3.0) for your desired machine's operating system. After pressing download, press on "No thanks, just start my download" and wait for the install to be complete. Once installed, open the installer wizard to begin installing MySQL. Continue through the next few pages, pressing "Next", and agreeing to any terms of use. Make sure to choose "Typical" for the setup type. After the download is complete, begin going through the MySQL Configurator. This will allow you to configure your MySQL server instance. Click "Next" for the next few tabs until you reach the "Accounts and Roles" tab. You will need to make a root account password. This can be anything; however, it is vital to save this information. For this example, I will be using password. On the Windows Service page, deselect "Start the MySQL Server at System Startup". This will prevent MySQL Server from always running on your machine. In reality, you can just start and stop the service when needed. Continue to click through the remaining tabs and complete your MySQL Server install.

Development Tools


Visual Studio Code

Visual Studio Code is the main integrated development environment (IDE) platform our team used for development. By installing Visual Studio Code, accessing, viewing, understanding, and even modifying our code will become much simpler. To install Visual Studio Code, travel to Visual Studio Code's downloads page. Here, chose the correct operating system and begin the install. Once the download is complete, open the installer. Click "Next" through the installer windows, accepting any terms of use when necessary. Press the "Install" button and install Visual Studio Code. From here, you'll be able to open Visual Studio Code to access our teams files!

MySQL Workbench

MySQL Workbench is a staple development used by the backend database team during application development. This tool allows developers to efficiently construct MySQL database tables, queries, and diagrams. For the purposes of this application, if the initial database ever needed to be initialized, MySQL database could easily accomplish this. In order to install MySQL Workbench, travel to the MySQL community downloads page. Once here, make sure the proper version of Workbench is chosen for you current system (As of the making of this wiki, the version is MySQL Workbench 8.0.36). Press the download button, on the next page press "No thanks, just start my download". Once the download is complete, open the wizard to begin installation. Proceed through the next few pages, pressing "Next" when applicable. Once the download is complete, you'll now be able use MySQL Workbench to view database data.

Note

MySQL must be first installed before proceeding with the next steps. To install MySQL, refer to the MySQL section.

Once MySQL is installed, on your MySQL Workbench dashboard, you should be able to view your local instance for MySQL. It will look something like this: MySQL Workbench Dashboard Now, we will connect MySQL Workbench to our Lightsail database instance, holding all of the Tool Shed data. On the dashboard, next to "MySQL Connections", press the "+" button. This will pop up with the "Setup New Connection" window. We will need some Lightsail credentials in order to create this connection. These include the following:

  • Hostname: ls-9858058d0f47c2e4c292c2426c0260847de1aa38.c3i8ssyyouhq.us-east-2.rds.amazonaws.com
  • Username: dbmasteruser
  • Port: 3306
  • Password: ;p+Y<z15XBle|lw[1JXJPuy00Yg<knMj

The connection name should be named "SEAC-Tool-Shed-Database". These credentials must be inputted EXACTLY as they are shown above. The "Setup New Connection" window should look like the following:

Test MySQL Connection

Once all credentials are entered, press "Close" and click on the new MySQL Connection on the dashboard. Enter the password and if done correctly, you will now be able to view the "SEAC_Tool_Shed" database on the Lightsail database instance. To see the database, click on "Schemas" and you will see the "SEAC_Tool_Shed" database! If any problems arise, make sure all of your credentials are correct, you have MySQL Server running on your machine, and the Lightsail database instance is running.

Square Access


Clone this wiki locally