GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Virtual-Lab/INSTALL.md at main · Cloud-Computing-and-Services/Virtual-Lab

Expand file tree

/

INSTALL.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
232 lines (161 loc) · 5.53 KB
/

INSTALL.md

Copy path

File metadata and controls

232 lines (161 loc) · 5.53 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

UNIWA

UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS

University of West Attica · Department of Computer Engineering and Informatics


Cloud Computing and Services

Virtual Lab – Dockerized Cloud Services

Vasileios Evangelos Athanasiou
Student ID: 19390005

GitHub · LinkedIn

Georgios Theocharis
Student ID: 19390283

GitHub


Supervision

Supervisor: Vasileios Mamalis, Professor

UNIWA Profile

Supervisor: Dimitrios Kallergis, Applications Lecturer

UNIWA Profile · LinkedIn

Co-supervisor: Apostolos Anagnostopoulos, Special Technical Laboratory Staff

UNIWA Profile


Athens, June 2024



INSTALL

Virtual Lab – Dockerized Cloud Services

The shell scripts up.sh and down.sh automate the process of automatically running services and shutting them down respectively.


1. up.sh

#!/bin/bash

NETWORK="vlab_network"
WORDPRESS="../Wordpress"
MYSQL="../MySQL"
PHPMYADMIN="../phpMyAdmin"
COMPOSE_FILE="docker-compose.yaml"
COMPOSE_FILE_OVERRIDE="docker-compose.override.yaml"

up_containers() {
docker network create $NETWORK

echo "Starting MySQL..."
(cd $MYSQL && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE up -d)

echo "Starting phpMyAdmin..."
(cd $PHPMYADMIN && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE up -d)

echo "Starting WordPress..."
(cd $WORDPRESS && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE up -d)
}

up_containers

exit 0
  • NETWORK: The name of the Docker network to be created.
  • WORDPRESS: The filepath where the docker-compose files for running the Wordpress service are located.
  • MYSQL: The filepath where the docker-compose files for running the MySQL service are located.
  • PHPMYADMIN: The relative path to the phpMyAdmin Docker installation directory.
  • COMPOSE_FILE: The name of the main Docker Compose file that creates the image of each service and configures the network.
  • COMPOSE_FILE_OVERRIDE: The name of the Docker Compose override file that contains all the configs for each service.

2. down.sh

#!/bin/bash

NETWORK="vlab_network"
WORDPRESS="../Wordpress"
MYSQL="../MySQL"
PHPMYADMIN="../phpMyAdmin"
COMPOSE_FILE="docker-compose.yaml"
COMPOSE_FILE_OVERRIDE="docker-compose.override.yaml"

down_containers() {
echo "Stopping WordPress..."
(cd $WORDPRESS && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE down)

echo "Stopping phpMyAdmin..."
(cd $PHPMYADMIN && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE down)

echo "Stopping MySQL..."
(cd $MYSQL && docker compose -f $COMPOSE_FILE -f $COMPOSE_FILE_OVERRIDE down)

docker network rm $NETWORK
}

down_containers

exit 0

3. Install & Setup

To install and configure this project, follow these steps:

3.1 Clone the repository by running the command

git clone https://github.com/Cloud-Computing-and-Services/Virtual-Lab.git

3.2 Go to the project directory by pressing the command

cd Virtual-Lab/src

3.3 Go to the install directory, where the bash scripts that automate the startup and shutdown of the project are located

cd install

3.4 Start the project by running the bash script by pressing the command

./up.sh

3.5 Open your browser and visit the services at the following links:

  • Wordpress http://localhost:8080

  • MySQL http://localhost:3306

  • phpMyAdmin http://localhost:8081

Use phpMyAdmin to manage the MySQL database and configure the database for WordPress.


4. Stop

To stop the services from running, follow these steps:

4.1 Go to the install directory, where the bash scripts that automate starting and stopping the project are located

cd install

4.2 Terminate the project by running the bash script by pressing the command

./down.sh

5. Conclusion

To summarize, with the above shell scripts we can create or remove the containers of the 3 services of the application. Removing the containers includes removing the network that the containers communicate with. The data volumes remain as they are.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.