Skip to content

Commit 47b0a03

Browse files
document update / docker-compose.yaml update
1 parent 57b89e1 commit 47b0a03

9 files changed

+32
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# MC-Workflow-Manager**MC-Workflow-Manager** is one of the components of the [M-CMP](https://github.com/m-cmp/docs/tree/main) platform. With **MC-Workflow-Manager**, you can easily create and execute workflows, as well as modify and delete them as needed. For example, it allows you to create and manage multi-cloud infrastructures and seamlessly deploy applications across multiple clouds.## Features- Workflow creation and execution- Workflow Stage management- Workflow management---## Table of Contents1. [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 RequirementsTo use **mc-workflow-manager**, ensure your system meets the following requirements:- **Operating System**: Linux (Ubuntu 22.04 LTS recommended)- **Java**: OpenJDK 17+- **Gradle**: v7.6+- **Docker**: v24.0.2+- **WorkflowEngine(Jenkins)**: v2.424+- **Git**: Latest version---## Installation with Docker ComposeThe easiest way to deploy **mc-workflow-manager** is via Docker Compose. Follow the steps below to get started.### Step 1: Clone the RepositoryFirst, clone the `mc-workflow-manager` repository to your local machine:```bashgit clone https://github.com/m-cmp/mc-workflow-manager.gitcd mc-workflow-manager```### Step 2: Configure Environment VariablesYou can customize the following environment variables in the docker-compose.yaml file:- DB_INIT_YN: Database initialization (create, update, create-drop, none ....)- DB_ID: Database user ID- DB_PW: Database user password- Edit these environment variables according to your needs.### Step 3: Install and Run Docker ComposeTo bring up the mc-workflow-manager service along with its dependencies, run the following command:```bashsudo apt updatesudo apt install -y docker-composecd ./scriptchmod +x setup-docker-no-sudo.sh./setup-docker-no-sudo.shcd ..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 ApplicationOnce the services are up, you can access the following endpoints:- Swagger UI: http://<Public_IP>:18083/swagger-ui/index.html- WorkflowEngine(Jenkins) UI: http://<Public_IP>:9800- Workflow Manager UI: - http://<Public_IP>:18083 - OSS Management: http://<Public_IP>:18083/web/oss/list - Workflow Stage Management: http://<Public_IP>:18083/web/workflowStage/list - Workflow Management: http://<Public_IP>:18083/web/workflow/list - Event Listener Management: http://<Public_IP>:18083/web/eventListener/list### Step 5: Stop ServicesTo stop the running services, use:```bashsudo docker-compose down```This will gracefully shut down the containers without removing volumes, allowing you to preserve the state of the database.---## Project Structure```bashmc-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 RunIf 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 WorkflowEngine(Jenkins)**1. Access the Jenkins container**```bashsudo docker exec -it we-jenkins /bin/bash```**2. Inside the container, retrieve the initial admin password**```bashcat /var/jenkins_home/secrets/initialAdminPassword```**3. Copy the string that appears after running the cat command.****4. Open Chrome browser and navigate to `http://<Public IP>: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**---## ContributingWe 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.---## LicenseThis project is licensed under the terms of the Apache 2.0 License. See the LICENSE file for details.
1+
# MC-Workflow-Manager**MC-Workflow-Manager** is one of the components of the [M-CMP](https://github.com/m-cmp/docs/tree/main) platform. With **MC-Workflow-Manager**, you can easily create and execute workflows, as well as modify and delete them as needed. For example, it allows you to create and manage multi-cloud infrastructures and seamlessly deploy applications across multiple clouds.## Features- Workflow creation and execution- Workflow Stage management- Workflow management---## Table of Contents1. [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 RequirementsTo use **mc-workflow-manager**, ensure your system meets the following requirements:- **Operating System**: Linux (Ubuntu 22.04 LTS recommended)- **Java**: OpenJDK 17+- **Gradle**: v7.6+- **Docker**: v24.0.2+- **WorkflowEngine(Jenkins)**: v2.424+- **Git**: Latest version---## Installation with Docker ComposeThe easiest way to deploy **mc-workflow-manager** is via Docker Compose. Follow the steps below to get started.### Step 1: Clone the RepositoryFirst, clone the `mc-workflow-manager` repository to your local machine:```bashgit clone https://github.com/m-cmp/mc-workflow-manager.gitcd mc-workflow-manager```### Step 2: Configure Environment VariablesYou can customize the following environment variables in the docker-compose.yaml file:### Workflow Engine- JENKINS_USERNAME: Workflow-engine User Name- JENKINS_PASSWORD: Workflow-engine User Password### MC-Workflow-Manager- DB_INIT_YN: Database initialization (create, update, create-drop, none ....)- DB_ID: Database user ID- DB_PW: Database user password- Edit these environment variables according to your needs.### Step 3: Install and Run Docker ComposeTo bring up the mc-workflow-manager service along with its dependencies, run the following command:```bashsudo apt updatesudo apt install -y docker-composecd ./scriptchmod +x setup-docker-no-sudo.sh./setup-docker-no-sudo.shcd ..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 ApplicationOnce the services are up, you can access the following endpoints:- Swagger UI: http://<Public_IP>:18083/swagger-ui/index.html- WorkflowEngine(Jenkins) UI: http://<Public_IP>:9800- Workflow Manager UI: - http://<Public_IP>:18083 - OSS Management: http://<Public_IP>:18083/web/oss/list - Workflow Stage Management: http://<Public_IP>:18083/web/workflowStage/list - Workflow Management: http://<Public_IP>:18083/web/workflow/list - Event Listener Management: http://<Public_IP>:18083/web/eventListener/list### Step 5: Stop ServicesTo stop the running services, use:```bashsudo docker-compose down```This will gracefully shut down the containers without removing volumes, allowing you to preserve the state of the database.---## Project Structure```bashmc-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 RunIf 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 ```---## ContributingWe 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.---## LicenseThis project is licensed under the terms of the Apache 2.0 License. See the LICENSE file for details.

docker-compose.yaml

+31-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ networks:
99
services:
1010
# jenkins - for workflow manager
1111
jenkins:
12-
image: jenkins/jenkins:jdk17
12+
image: bitnami/jenkins:2.462.3
13+
user: root
1314
container_name: we-jenkins
1415
platform: linux/amd64
1516
networks:
@@ -21,13 +22,35 @@ services:
2122
protocol: tcp
2223
- "8080:8080" # or any other required port mapping
2324
volumes:
24-
- ./:/var/jenkins_home # -v $HOME/mcmp/oss/jenkins:/var/jenkins_home
25+
- ./jenkins_home:/bitnami/jenkins/home # -v $HOME/mcmp/oss/jenkins:/var/jenkins_home
2526
- /var/run/docker.sock:/var/run/docker.sock
2627
- /usr/bin/docker:/usr/bin/docker # -v $(which docker):/usr/bin/docker
2728
environment:
28-
- PROJECT=mcmp
29+
JENKINS_USERNAME: admin
30+
JENKINS_PASSWORD: 123456
31+
JENKINS_PLUGINS: >-
32+
workflow-api,
33+
swarm,
34+
authorize-project,
35+
antisamy-markup-formatter,
36+
pipeline-github-lib,
37+
pipeline-rest-api,
38+
git,
39+
github-branch-source,
40+
gradle,
41+
pipeline-model-definition,
42+
pipeline-build-step,
43+
workflow-aggregator,
44+
matrix-project,
45+
email-ext,
46+
durable-task,
47+
checks-api,
48+
build-timeout,
49+
timestamper,
50+
ws-cleanup,
51+
ssh-slaves
2952
healthcheck: # for workflow-manager
30-
test: [ "CMD", "curl", "-f", "http://localhost:1024/catalog/software" ]
53+
test: [ "CMD", "curl", "-f", "http://localhost:8080/login" ]
3154
interval: 1m
3255
timeout: 5s
3356
retries: 3
@@ -37,9 +60,9 @@ services:
3760
mc-workflow-manager:
3861
image: cloudbaristaorg/mc-workflow-manager:edge
3962
container_name: workflow-manager
40-
# build:
41-
# context: ./
42-
# dockerfile: Dockerfile
63+
depends_on:
64+
jenkins:
65+
condition: service_healthy
4366
networks:
4467
- external_network
4568
ports:
@@ -54,7 +77,7 @@ services:
5477
- DB_PW=workflow!23
5578
- SQL_DATA_INIT=always # SQL_DATA_INIT=never
5679
healthcheck: # for cb-workflow-manager
57-
test: ["CMD", "nc", "-vz", "localhost", "1324"]
80+
test: ["CMD", "curl", "-f", "http://localhost:18083/readyz"]
5881
interval: 1m
5982
timeout: 5s
6083
retries: 3

document/img.png

-194 KB
Binary file not shown.

document/img_1.png

-22.2 KB
Binary file not shown.

document/img_2.png

-31.1 KB
Binary file not shown.

document/img_3.png

-26.5 KB
Binary file not shown.

document/img_4.png

-28.4 KB
Binary file not shown.

document/img_5.png

-59.6 KB
Binary file not shown.

document/img_6.png

-45.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)