diff --git a/README.md b/README.md index e896074..21ea07e 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# MC-Workflow-Manager The **MC-Workflow-Manager** is a key component of the [M-CMP](https://github.com/m-cmp/docs/tree/main) platform. It facilitates the creation and management of multi-cloud infrastructures through workflows, enabling the seamless deployment of applications across multiple clouds. ## Features - Workflow creation and execution - Workflow Stage management - Workflow management --- ## Table of Contents 1. [System Requirements](#system-requirements) 2. [Installation with Docker Compose](#installation-with-docker-compose) 3. [Project Structure](#project-structure) 4. [Run Instructions](#run-instructions) 5. [Contributing](#contributing) 6. [License](#license) --- ## System Requirements To use **mc-workflow-manager**, ensure your system meets the following requirements: - **Operating System**: Linux (Ubuntu 22.04 LTS recommended) - **Java**: OpenJDK 11+ - **Gradle**: v7.6+ - **Docker**: v24.0.2+ - **Jenkins**: v2.424+ - **Git**: Latest version --- ## Installation with Docker Compose The easiest way to deploy **mc-workflow-manager** is via Docker Compose. Follow the steps below to get started. ### Step 1: Clone the Repository First, clone the `mc-workflow-manager` repository to your local machine: ```bash git clone https://github.com/m-cmp/mc-workflow-manager.git cd mc-workflow-manager ``` ### Step 2: Configure Environment Variables You can customize the following environment variables in the docker-compose.yaml file: - DB_INIT_YN: Database initialization (create or reuse) - DB_ID: Database user ID - DB_PW: Database user password Edit these environment variables according to your needs. ### Step 3: Run Docker Compose To bring up the mc-workflow-manager service along with its dependencies, run the following command: ```bash docker-compose up -d ``` This command will pull the necessary Docker images, build the services, and start the containers in detached mode. ### Step 4: Access the Application Once the services are up, you can access the following endpoints: - Swagger UI: http://:18083/swagger-ui/index.html - Jenkins UI: http://:9800 - Workflow Manager UI: - http://:18083 - OSS Management: http://:18083/web/oss/list - Workflow Stage Management: http://:18083/web/workflowStage/list - Workflow Management: http://:18083/web/workflow/list - Event Listener Management: http://:18083/web/eventListener/list ### Step 5: Stop Services To stop the running services, use: ```bash docker-compose down ``` This will gracefully shut down the containers without removing volumes, allowing you to preserve the state of the database. --- ## Project Structure ```bash mc-workflow-manager/ ├── docker-compose.yaml # Docker Compose file for service orchestration ├── src/ # Source code for the Workflow Manager ├── script/ # Helper scripts for build and execution ├── README.md # Project documentation ├── LICENSE # License information └── docs/ # Additional documentation ``` --- ## Run Instructions ### Manual Build and Run If you prefer to build and run the project manually, follow these steps: - Install Git ```bash sudo apt update sudo apt install -y git ``` - Download mc-workflow-manager Source Code ```bash export BASE_DIR=$HOME/mcmp mkdir -p $BASE_DIR/git cd $BASE_DIR/git git clone https://github.com/m-cmp/mc-workflow-manager.git export PROJECT_ROOT=$(pwd)/mc-workflow-manager ``` - Install Required Packages/Tools and Set Environment Variables - Install Java, Docker ```bash export PROJECT_ROOT=$HOME/mcmp/git/mc-workflow-manager cd $PROJECT_ROOT/script sudo chmod +x *.sh . $PROJECT_ROOT/script/init-install.sh ``` - Set Environment Variables ```bash cd $PROJECT_ROOT/script . $PROJECT_ROOT/script/set_env.sh source $HOME/.bashrc ``` - Build and Run - Execute Shell Script ```bash # Run Jenkins . $PROJECT_ROOT/script/run-jenkins.sh # Build Springboot Project . $PROJECT_ROOT/script/build-mc-workflow.sh # Run Springboot Project . $PROJECT_ROOT/script/run-mc-workflow.sh ``` --- ## Contributing We welcome contributions to the **mc-workflow-manager** project! To get involved, follow these steps: 1. Fork the repository on GitHub. 2. Create a feature branch: ```git checkout -b feature-branch```. 3. Commit your changes: ```git commit -m "Add new feature"```. 4. Push the branch: ```git push origin feature-branch```. 5. Open a Pull Request. 6. For detailed guidelines, refer to the Contributing Guide. --- ## License This project is licensed under the terms of the Apache 2.0 License. See the LICENSE file for details. \ No newline at end of file +# MC-Workflow-Manager The **MC-Workflow-Manager** is a key component of the [M-CMP](https://github.com/m-cmp/docs/tree/main) platform. It facilitates the creation and management of multi-cloud infrastructures through workflows, enabling the seamless deployment of applications across multiple clouds. ## Features - Workflow creation and execution - Workflow Stage management - Workflow management --- ## Table of Contents 1. [System Requirements](#system-requirements) 2. [Installation with Docker Compose](#installation-with-docker-compose) 3. [Project Structure](#project-structure) 4. [Run Instructions](#run-instructions) 5. [Contributing](#contributing) 6. [License](#license) --- ## System Requirements To use **mc-workflow-manager**, ensure your system meets the following requirements: - **Operating System**: Linux (Ubuntu 22.04 LTS recommended) - **Java**: OpenJDK 11+ - **Gradle**: v7.6+ - **Docker**: v24.0.2+ - **Jenkins**: v2.424+ - **Git**: Latest version --- ## Installation with Docker Compose The easiest way to deploy **mc-workflow-manager** is via Docker Compose. Follow the steps below to get started. ### Step 1: Clone the Repository First, clone the `mc-workflow-manager` repository to your local machine: ```bash git clone https://github.com/m-cmp/mc-workflow-manager.git cd mc-workflow-manager ``` ### Step 2: Configure Environment Variables You can customize the following environment variables in the docker-compose.yaml file: - DB_INIT_YN: Database initialization (create or reuse) - DB_ID: Database user ID - DB_PW: Database user password Edit these environment variables according to your needs. ### Step 3: Install and Run Docker Compose To bring up the mc-workflow-manager service along with its dependencies, run the following command: ```bash sudo apt update sudo apt install -y docker-compose sudo docker-compose up -d ``` This command will pull the necessary Docker images, build the services, and start the containers in detached mode. ### Step 4: Access the Application Once the services are up, you can access the following endpoints: - Swagger UI: http://:18083/swagger-ui/index.html - Jenkins UI: http://:9800 - Workflow Manager UI: - http://:18083 - OSS Management: http://:18083/web/oss/list - Workflow Stage Management: http://:18083/web/workflowStage/list - Workflow Management: http://:18083/web/workflow/list - Event Listener Management: http://:18083/web/eventListener/list ### Step 5: Stop Services To stop the running services, use: ```bash sudo docker-compose down ``` This will gracefully shut down the containers without removing volumes, allowing you to preserve the state of the database. --- ## Project Structure ```bash mc-workflow-manager/ ├── docker-compose.yaml # Docker Compose file for service orchestration ├── src/ # Source code for the Workflow Manager ├── script/ # Helper scripts for build and execution ├── README.md # Project documentation ├── LICENSE # License information └── docs/ # Additional documentation ``` --- ## Run Instructions ### Manual Build and Run If you prefer to build and run the project manually, follow these steps: - Install Git ```bash sudo apt update sudo apt install -y git ``` - Download mc-workflow-manager Source Code ```bash cd $HOME git clone https://github.com/m-cmp/mc-workflow-manager.git export PROJECT_ROOT=$(pwd)/mc-workflow-manager ``` - Install Required Packages/Tools and Set Environment Variables - Install Java, Docker ```bash cd $PROJECT_ROOT/script sudo chmod +x *.sh . $PROJECT_ROOT/script/init-install.sh ``` - Set Environment Variables ```bash cd $PROJECT_ROOT/script . $PROJECT_ROOT/script/set_env.sh source $HOME/.bashrc ``` - Build and Run - Execute Shell Script ```bash # Run Jenkins . $PROJECT_ROOT/script/run-jenkins.sh # Build Springboot Project . $PROJECT_ROOT/script/build-mc-workflow.sh # Run Springboot Project . $PROJECT_ROOT/script/run-mc-workflow.sh ``` ### Refer to Set WorkflowEngin(Jenkins) **1. Access the Jenkins container** ```bash sudo docker exec -it jenkins /bin/bash ``` **2. Inside the container, retrieve the initial admin password** ```bash cat /var/jenkins_home/secrets/initialAdminPassword ``` **3. Copy the string that appears after running the cat command.** **4. Open Chrome browser and navigate to `http://:9800` Jenkins Unlock Page** ![img_4.png](document/img_4.png) **5. Paste the copied string into the password field.** **6. Click `Install suggested plugins` Button** ![img_5.png](document/img_5.png) ![img_6.png](document/img_6.png) **7. Insert User Information** ![img_1.png](document/img_1.png) ![img_2.png](document/img_2.png) ![img_3.png](document/img_3.png) **This process will complete the initial setup of Jenkins** --- ## Contributing We welcome contributions to the **mc-workflow-manager** project! To get involved, follow these steps: 1. Fork the repository on GitHub. 2. Create a feature branch: ```git checkout -b feature-branch```. 3. Commit your changes: ```git commit -m "Add new feature"```. 4. Push the branch: ```git push origin feature-branch```. 5. Open a Pull Request. 6. For detailed guidelines, refer to the Contributing Guide. --- ## License This project is licensed under the terms of the Apache 2.0 License. See the LICENSE file for details. \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index ba35ef5..a389dae 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -35,11 +35,11 @@ services: # workflow-manager mc-workflow-manager: - image: cloudbaristaorg/mc-workflow-manager + image: cloudbaristaorg/mc-workflow-manager:edge container_name: workflow-manager - build: - context: ./ - dockerfile: Dockerfile +# build: +# context: ./ +# dockerfile: Dockerfile networks: - external_network ports: diff --git a/document/img.png b/document/img.png new file mode 100644 index 0000000..48859ee Binary files /dev/null and b/document/img.png differ diff --git a/document/img_1.png b/document/img_1.png new file mode 100644 index 0000000..a5433f1 Binary files /dev/null and b/document/img_1.png differ diff --git a/document/img_2.png b/document/img_2.png new file mode 100644 index 0000000..3694f7c Binary files /dev/null and b/document/img_2.png differ diff --git a/document/img_3.png b/document/img_3.png new file mode 100644 index 0000000..719ffef Binary files /dev/null and b/document/img_3.png differ diff --git a/document/img_4.png b/document/img_4.png new file mode 100644 index 0000000..120de88 Binary files /dev/null and b/document/img_4.png differ diff --git a/document/img_5.png b/document/img_5.png new file mode 100644 index 0000000..0b4a0af Binary files /dev/null and b/document/img_5.png differ diff --git a/document/img_6.png b/document/img_6.png new file mode 100644 index 0000000..466a39e Binary files /dev/null and b/document/img_6.png differ