RoR Deployment on Google Cloud Platform
Overview
This application is a simple web application-based login form implemented with Ruby on Rails where Ruby is an interpreted, high level, object oriented programming language and Rails is a framework.
The application is deployed on Google Cloud Platform.
Goals
Application accepts username and password. For valid credentials, it displays a message “Login successful! You are logged in as (loggedin_username) ”
Valid logged in users can log out successfully .
Application accepts username and password. For invalid credentials, it displays a message “Authentication failed! Please enter correct credentials.”
Specifications
Programming language : Ruby
Web application framework : Rails (MVC)
Deployment : Google Cloud Platform
Source code : https://github.com/amrutapednekar/authentication_appDeployment on Google Cloud Platform
New project
Created a new project on Google Cloud Platform.
Open cloud shell terminal
Clone application code
Application code is cloned from git repository to the Cloud shell.
Ruby installation version 2.7.3
Installed ruby version 2.7.3. Command “ruby -v” shows installed ruby version 2.7.3
Installation of other dependencies and gems
Command “bundle install” helps to install all other dependencies and required gems that we already listed in GemFile.rb
Application is running on GCP
Command “rails s -p 8080” runs application on port number 8080
Use cases
Login form
Once an application is deployed , it displays a login form. First textfield is to enter username and second password field is to enter password.
Server logs
First user enters username and password
User enters the username and a valid password. As it is secured, inserted password is not displayed.
User clicks on the Login button.
Server logs
User logged in successfully
Application verifies logged in credentials with credentials already saved in the system.
If credentials match, , the user logs in successfully.
It displays the message “Login successful! You are logged in as --------”.
System displays username successfully.
User logs out. Server logs
4. Third user enters incorrect credentials
User enters a wrong username and a password. As it is secured, the inserted password is not displayed.
User clicks on the Login button.
Server logs
5. User log in unsuccessfully
Application verifies logged in credentials with credentials already saved in the system. As credentials don't match, the user login unsuccessfully.
It displays the error message in red color “Authentication failed! Please enter correct credentials.”
User remains on the login page.
Comments
Post a Comment