An Application with Docker and Amazon Web Services

An Application with Docker and Amazon Web Services

Duc Nguyen AN APPLICATION WITH DOCKER AND AMAZON WEB SERVICES AN APPLICATION WITH DOCKER AND AMAZON WEB SERVICES Duc Nguyen Bachelor’s thesis Autumn 2019 Information Technology Oulu University of Applied Sciences ABSTRACT Oulu University of Applied Sciences Information Technology, Software Engineering Author: Duc Nguyen Title of Bachelor´s thesis: An application with Docker and Amazon Web Services Supervisor: Kari Laitinen Term and year of completion: Autumn 2019 Number of pages: 41 pages + 3-page appendix The main purpose of this thesis is to broaden the selection of cloud services by suggesting a guideline that can be utilized to deploy application on Amazon Web Services. The reason behind the decision to choose AWS Batch over AWS Lambda and other services are discussed. The author’s case company, Tori has been using AWS Batch to process high volumes of data in batch. Thus, the application must be scalable, resilient, nimble, and able to undertake heavy load. Additionally, this thesis serves to demonstrate the steps needed to deploy an application using AWS and Docker, which are modern technologies and commonly used when developing software nowadays. The release pipeline in this project has been made in order to meet the demands of modern software development and improve the efficiency as well as robustness for the developers. The result of this project is a fully functional software that plays an essential role in the case company and processes significant amount of data every day. The requirements for the software, such as elasticity, consistency, etc., are satisfied. Further improvements are planned and will be implemented in the nearest future. Keywords: PHP, Docker, AWS 3 CONTENTS VOCABULARY ............................................................................................................................................. 6 1 INTRODUCTION ................................................................................................................................. 7 1.1 Thesis objectives and research question ................................................................................ 7 1.2 The Company TORI ................................................................................................................ 7 2 TECHNOLOGY .................................................................................................................................. 10 2.1 Object-oriented Programming ............................................................................................... 10 2.2 Docker ................................................................................................................................... 11 2.3 Amazon Web Services .......................................................................................................... 13 2.3.1 AWS CloudFormation ............................................................................................ 13 2.3.2 AWS Elastic Compute Cloud ................................................................................. 14 2.3.3 AWS Lambda......................................................................................................... 15 2.3.4 AWS Batch ............................................................................................................ 17 2.3.5 Relational Database Service ................................................................................. 18 2.3.6 Elastic Container Registry ..................................................................................... 18 2.3.7 Simple Storage Service ......................................................................................... 19 2.4 Continuous Integration, Delivery & Deployment .................................................................... 20 3 IMPLEMENTATION ........................................................................................................................... 21 3.1 Analysis and design............................................................................................................... 21 3.1.1 Building the System with AWS Services ................................................................ 21 3.1.2 Sputnik components .............................................................................................. 23 3.2 Development process ............................................................................................................ 25 3.2.1 Important concepts in advertisements ................................................................... 25 3.2.2 Installing dependencies ......................................................................................... 26 3.2.3 Dockerization ......................................................................................................... 27 3.2.4 Building Docker container ...................................................................................... 28 3.2.5 CloudFormation ..................................................................................................... 29 3.3 Usage .................................................................................................................................... 30 3.3.1 Command .............................................................................................................. 30 3.3.2 Architecture............................................................................................................ 32 3.3.3 Database model ..................................................................................................... 33 3.3.4 Testing ................................................................................................................... 35 3.3.5 CI/CD ..................................................................................................................... 36 3.4 Further improvement ............................................................................................................. 37 3.4.1 Implement unit tests ............................................................................................... 37 3.4.2 Speed up Parser .................................................................................................... 37 4 3.4.3 Improve locking mechanism .................................................................................. 38 4 CONCLUSION ................................................................................................................................... 39 5 REFERENCES .................................................................................................................................. 40 LIST OF FIGURES AND TABLES .............................................................................................................. 41 APPENDICES ............................................................................................................................................. 42 5 VOCABULARY API Application Programming Interface AWS Amazon Web Service CD Continuous Delivery CI Continuous Integration EC2 Elastic Compute Cloud ECR Elastic Container Registry HTML Hypertext Markup Language JSON JavaScript Object Notation OOP Object Oriented Programming PHP Hypertext Preprocessor RDS Relational Database Service S3 Simple Storage Service XML Extensible Markup Language 6 1 INTRODUCTION 1.1 Thesis objectives and research question RESEARCH OBJECTIVE The goal of this thesis is to document and suggest a guideline that can be used for future reference when developing and deploying applications using Amazon Web Services and Docker. Technologies are continuously moving forward, enabling a vast variety of possibilities that were once impossible due to technical limitations. The aim of this project is to utilize the cutting-edge technologies for developing software, through the act of describing its process and indicating the advantages and disadvantages. The author’s inspiration is Sputnik, an integration project that processes thousands of advertisements to publicize on Tori.fi website. RESEARCH QUESTIONS Research questions act as a lodestar which help authors to stay on the right path when researching and writing. In this thesis, the author focuses on answering these following research questions: 1. Which platform and Amazon Web Services components can be used to implement and deploy an integration application seamlessly, especially for project written in PHP? 2. What software architecture is needed to develop an integration program? 3. How to set up and use Docker in Amazon Web Services? 4. What is Continuous Deployment? How to use it in this specific case? 1.2 The Company TORI Tori.fi is the biggest and most prominent customer-to-customer (C2C) marketplace in Finland. However, there are many competitors for example Facebook marketplace or Nettiauto and Huuto.net which indicates that there is still room to grow. On Tori.fi, there are buyers and sellers in all kinds of goods: furniture, vehicles such as cars or motorbikes, electronics, hobby equipment, etc. C2C online marketplaces are common selling channels for end users around the world, regularly giving online vendors a platform to a broad range of customer base. Tori.fi plays an important role in world of circular economy by raising the awareness about reusing and repairing products as well as reducing non- essential goods to minimize littering. 7 In European countries, although the C2C online marketplaces have been in tough competition with newly arrived companies such as Facebook or Amazon, they still hold

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    44 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us