This project involves creating and setting up the web server for the startup's website, building scripts to automate the app's deployment, and establishing monitoring and logging systems to track server performance and troubleshoot issues.
Table of Contents
- Set up a reliable and secure web server.
- Automate the deployment process for consistency and efficiency.
- Implement monitoring and logging systems to track and troubleshoot server performance. Deliverables
- Configured web server.
- Deployment automation scripts.
- Monitoring and logging systems with reports and dashboards.
Web Server Setup: Set up and configure the web server to host the startup's website. This includes installing necessary server software, configuring security settings, and ensuring the server is optimized for performance and reliability. Deployment Automation: Build scripts or use tools to automate the deployment of the application. This includes setting up continuous integration/continuous deployment (CI/CD) pipelines if required. Ensure the deployment process is repeatable and reliable. Monitoring and Logging Systems: Establish monitoring and logging systems to track server performance indicators and troubleshoot issues. This includes setting up tools for real-time monitoring, logging server activities, and generating performance reports.
Tested on AWS Ubuntu-24 servers
- Ip addresses and the private keys of the servers
- scp installed to communicate with the servers:
sudo apt-get update sudo apt-get install openssh-client
- Download or clone the entire repository
- In create_service_server.sh, change the SERVER_IP and PRIVATE_KEY_LOC
- Run create_service_server.sh
sudo ./create_service_server.sh
- In load_balancer_scripts/http.cfg file add your service servers ip addresses:
... server service-server-01 {SERVER_IP_01}:80 check server service-server-02 {SERVER_IP_02}:80 check # server {any name} {SERVER_IP_03}:80 check # server {any name} {SERVER_IP_04}:80 check ...
- In create_load_balancer.sh, change the SERVER_IP and PRIVATE_KEY_LOC
- Run create_load_balancer.sh
sudo ./create_load_balancer.sh
Let's first define what a static website is. A static website delivers the same content to every user, meaning that all visitors view identical information on each page. For example, pages like privacy policies are typically static because their content doesn't change based on who is viewing them.
To edit the static content of the website, update the files in the web_static folder. If you add a new folder inside web_static, the folder name will be part of the URL required to access the page. For example:
- If you create a folder web_static/about-us, the URL to access that page will be domain/about-us.
- If you create a folder web_static/privacy, the URL will be domain/privacy. It's important to note that Nginx will look for a file named index.html in each folder. Therefore, make sure that your HTML file is named index.html to ensure it is correctly loaded.
Tested on AWS Ubuntu-24 servers and python 3.12 After completing your updates to the web_static content, you can deploy it to a service server by following these steps:
- In deploy_web_static.sh, change the serverIP and privateKeyPath to your service server
- Run deploy_web_static.sh
sudo python3 deploy_web_static.sh
Let's first define what a dynamic website is. A dynamic website delivers content that can change based on the user or other factors, such as user inputs or data from a database. Unlike static websites, dynamic sites adjust content in real-time to offer personalized or interactive experiences.
You can develop any Node.js application within the web_dynamic_nodejs folder. It's important to note that the server will automatically look for a file named main.js to run your application. Therefore, be sure to name your primary JavaScript file main.js to ensure it is properly recognized and executed by the server.
After completing your updates to the web_dynamic_nodejs content, you can deploy it to a service server by following these steps:
- In deploy_web_dynamic.sh, change the serverIP and privateKeyPath to your service server
- Run deploy_web_dynamic.sh
sudo python3 deploy_web_dynamic.sh
- Develop a file to store all service server information, enabling automatic deployment to all servers.
- Implement a GitHub Action to automate deployment, with versioning managed by Git.
- Add clear success and failure messages for the deployment process.
- Automate the configuration of the load balancer by using the file that stores service server information.
- Implement a logging system to capture and track application events and errors.
- And many more enhancements to improve automation and efficiency.
Distributed under the MIT License. See LICENSE.txt
for more information.
- Abdullrahmen Ahmed Seif - Linkedin - abdullrahmen2003@gmail.com
- Project Link: https://github.com/Abdullrahmen/Cubar-website-servers