From 19bd2ca30653e813bd65b115c53bf921ce0528fe Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Wed, 13 Nov 2024 13:28:04 +0530 Subject: [PATCH 1/6] gcs-create-bucket plugin doc --- docs/user-guide/plugins/gcs-create-bucket.md | 69 ++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/user-guide/plugins/gcs-create-bucket.md diff --git a/docs/user-guide/plugins/gcs-create-bucket.md b/docs/user-guide/plugins/gcs-create-bucket.md new file mode 100644 index 000000000..d6c3711e1 --- /dev/null +++ b/docs/user-guide/plugins/gcs-create-bucket.md @@ -0,0 +1,69 @@ +# GCS Create Bucket + +## Introduction +The **GCS Create Bucket** plugin of Devtron enables automated creation of Google Cloud Storage (GCS) buckets directly within CI/CD workflows. By integrating the GCS Create Bucket teams can simplify cloud storage provisioning and can efficiently manage and store application logs, deployment artifacts, backup data, and other critical application assets in a centralized cloud storage solution. + +### Prerequisites +Before integrating the **GCS Create Bucket** plugin, ensure you have a Google Cloud Platform (GCP) account and GCP Project with appropriate permissions. + +--- + +## Steps +1. Go to **Applications** → **Devtron Apps**. +2. Click your application. +3. Go to **App Configuration** → **Workflow Editor**. +4. Click **New Workflow** and navigate to the **Build and Deploy from Source Code**. +5. Fill the required fields in the **Create build pipeline** window and navigate to the **Pre-build stage**. + +{% hint style="warning" %} +If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. +{% endhint %} + +6. Under 'TASKS', click the **+ Add task** button. +7. Click the **GCS Create Bucket** plugin. +8. Enter the following [user inputs](#user-inputs) with appropriate values. +--- + +## User Inputs + +### Task Name +Enter the name of your task + +e.g., `GCS Create Bucket` + +### Description +Add a brief explanation of the task and the reason for choosing the plugin. Include information for someone else to understand the purpose of the task. + +e.g., `A Plugin to create GCS Bucket` + +### Input Variables + +| Variable | Format | Description | Sample Value | +| ------------------------ | ------------ | ----------- | ------------ | +| BucketName | STRING | Name of the GCS bucket to be created | my-app-logs-bucket | +| StorageClass | STRING | Storage class for the bucket (STANDARD, NEARLINE, COLDLINE, ARCHIVE) | archive | +| Project | STRING | GCP project ID where the bucket will be created | gcp-68493 | +| EnableBucketPrefix | STRING | Enable prefix for bucket naming (true/false) | true | +| ServiceAccountCred | STRING | Base64 encoded GCP service account credentials | eyJ0eXBlIjoic2VydmljZV9hY2 | +| LocationType | STRING | Type of location (region/dual-region/multi-region) | region | +| Location | STRING | Geographic location where bucket will be created | us-central1 | +| EnableAutoClass | BOOL | Automatically optimizes storage costs by moving objects between storage classes based on how frequently they are accessed. Default is false. | true | +| UniformAccess | STRING | Enable uniform bucket-level access control to create bucket with bucket level permissions instead of Access control list (true/false) | true | + +### Trigger/Skip Condition +Here you can set conditions to execute or skip the task. You can select `Set trigger conditions` for the execution of a task or `Set skip conditions` to skip the task. + +### Output Variables + +| Variable | Format | Description | +| ------------------------ | ------------ | ----------- | +| BucketName | STRING | The name of the bucket createed. + +### Pass/Failure Condition +Here you can define when a task should be marked as passed or failed. You can select `Set pass conditions` to define success criteria or `Set failure conditions` to specify failure scenarios. + + +Click **Update Pipeline**. + + + From 336856361f0b708104cbdad21b3507d6a46626de Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 15 Nov 2024 12:53:52 +0530 Subject: [PATCH 2/6] fix --- docs/user-guide/plugins/gcs-create-bucket.md | 69 -------------------- 1 file changed, 69 deletions(-) delete mode 100644 docs/user-guide/plugins/gcs-create-bucket.md diff --git a/docs/user-guide/plugins/gcs-create-bucket.md b/docs/user-guide/plugins/gcs-create-bucket.md deleted file mode 100644 index d6c3711e1..000000000 --- a/docs/user-guide/plugins/gcs-create-bucket.md +++ /dev/null @@ -1,69 +0,0 @@ -# GCS Create Bucket - -## Introduction -The **GCS Create Bucket** plugin of Devtron enables automated creation of Google Cloud Storage (GCS) buckets directly within CI/CD workflows. By integrating the GCS Create Bucket teams can simplify cloud storage provisioning and can efficiently manage and store application logs, deployment artifacts, backup data, and other critical application assets in a centralized cloud storage solution. - -### Prerequisites -Before integrating the **GCS Create Bucket** plugin, ensure you have a Google Cloud Platform (GCP) account and GCP Project with appropriate permissions. - ---- - -## Steps -1. Go to **Applications** → **Devtron Apps**. -2. Click your application. -3. Go to **App Configuration** → **Workflow Editor**. -4. Click **New Workflow** and navigate to the **Build and Deploy from Source Code**. -5. Fill the required fields in the **Create build pipeline** window and navigate to the **Pre-build stage**. - -{% hint style="warning" %} -If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. -{% endhint %} - -6. Under 'TASKS', click the **+ Add task** button. -7. Click the **GCS Create Bucket** plugin. -8. Enter the following [user inputs](#user-inputs) with appropriate values. ---- - -## User Inputs - -### Task Name -Enter the name of your task - -e.g., `GCS Create Bucket` - -### Description -Add a brief explanation of the task and the reason for choosing the plugin. Include information for someone else to understand the purpose of the task. - -e.g., `A Plugin to create GCS Bucket` - -### Input Variables - -| Variable | Format | Description | Sample Value | -| ------------------------ | ------------ | ----------- | ------------ | -| BucketName | STRING | Name of the GCS bucket to be created | my-app-logs-bucket | -| StorageClass | STRING | Storage class for the bucket (STANDARD, NEARLINE, COLDLINE, ARCHIVE) | archive | -| Project | STRING | GCP project ID where the bucket will be created | gcp-68493 | -| EnableBucketPrefix | STRING | Enable prefix for bucket naming (true/false) | true | -| ServiceAccountCred | STRING | Base64 encoded GCP service account credentials | eyJ0eXBlIjoic2VydmljZV9hY2 | -| LocationType | STRING | Type of location (region/dual-region/multi-region) | region | -| Location | STRING | Geographic location where bucket will be created | us-central1 | -| EnableAutoClass | BOOL | Automatically optimizes storage costs by moving objects between storage classes based on how frequently they are accessed. Default is false. | true | -| UniformAccess | STRING | Enable uniform bucket-level access control to create bucket with bucket level permissions instead of Access control list (true/false) | true | - -### Trigger/Skip Condition -Here you can set conditions to execute or skip the task. You can select `Set trigger conditions` for the execution of a task or `Set skip conditions` to skip the task. - -### Output Variables - -| Variable | Format | Description | -| ------------------------ | ------------ | ----------- | -| BucketName | STRING | The name of the bucket createed. - -### Pass/Failure Condition -Here you can define when a task should be marked as passed or failed. You can select `Set pass conditions` to define success criteria or `Set failure conditions` to specify failure scenarios. - - -Click **Update Pipeline**. - - - From ab31ef42819254e05c4ba2d5ee72ebe88ac89b88 Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 15 Nov 2024 16:37:22 +0530 Subject: [PATCH 3/6] ansible runner plugin doc --- docs/user-guide/plugins/ansible-runner.md | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/user-guide/plugins/ansible-runner.md diff --git a/docs/user-guide/plugins/ansible-runner.md b/docs/user-guide/plugins/ansible-runner.md new file mode 100644 index 000000000..7388e3779 --- /dev/null +++ b/docs/user-guide/plugins/ansible-runner.md @@ -0,0 +1,54 @@ +# Ansible Runner + +## Introduction +The **Ansible Runner** plugin by Devtron enables seamless execution of Ansible Playbooks within your Devtron workflows using the ansible-runner tool. For example, user can use this plugin to trigger the Ansible Plabooks which can automate task like configuring cluster add-ons, managing node configurations, and network configurations. + +### Prerequisites +Before integrating the **Ansible Runner** plugin make sure that you have properly configured Ansible playbooks. + +--- + +## Steps +1. Go to **Applications** → **Devtron Apps**. +2. Click your application. +3. Go to **App Configuration** → **Workflow Editor**. +4. Click **New Workflow** and navigate to the **Build and Deploy from Source Code**. +5. Fill the required fields in the **Create build pipeline** window and navigate to the **Pre-build stage**. + +{% hint style="warning" %} +If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. +{% endhint %} + +6. Under 'TASKS', click the **+ Add task** button. +7. Click the **Ansible Runner** plugin. +8. Enter the following [user inputs](#user-inputs) with appropriate values. +--- + +## User Inputs + +### Task Name +Enter the name of your task. + +e.g., `Ansible Runner` + +### Description +Add a brief explanation of the task and the reason for choosing the plugin. Include information for someone else to understand the purpose of the task. + +e.g., `The Ansible Runner plugin is integrated for updating network configuration before deployment of appliction.` + +### Input Variables + +| Variable | Format | Description | Sample Value | +| ------------------------ | ------------ | ----------- | ------------ | +| ProjectDirectory | STRING | The project directory path containing Ansible playbooks |/ansible/playbooks | +| RunnerDirectory | STRING | The directory path where ansible-runner will store temporary data and artifacts | /tmp/ansible-runner | +| RunnerArgument | STRING | Additional command-line arguments to pass to ansible-runner | "-v --inventory /path/to/inventory" | + +### Trigger/Skip Condition +Here you can set conditions to execute or skip the task. You can select `Set trigger conditions` for the execution of a task or `Set skip conditions` to skip the task. + +### Output Variables +Ansible Runner plugin will not be generating an output variable. + +Click **Update Pipeline**. + From 19ae7917458910ddc445abaf715f7a1ffa8e8946 Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 22 Nov 2024 12:33:33 +0530 Subject: [PATCH 4/6] updated summary --- docs/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 58af2000f..45f08a732 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -132,6 +132,7 @@ * [Pipeline Plugins](user-guide/plugins/README.md) * [Create Your Plugin](user-guide/plugins/create-plugin.md) * [Our Plugins](user-guide/plugins/plugin-list.md) + * [Ansible Runner](user-guide/plugins/ansible-runner.md) * [Codacy](user-guide/plugins/codacy.md) * [Code-Scan](user-guide/plugins/code-scan.md) * [Copacetic](user-guide/plugins/copacetic.md) From 849b02a4551d283fb739e394df8f1aeff8a5e029 Mon Sep 17 00:00:00 2001 From: Bhushan Nemade Date: Thu, 5 Dec 2024 14:10:42 +0530 Subject: [PATCH 5/6] Minor fixes --- docs/user-guide/plugins/ansible-runner.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/plugins/ansible-runner.md b/docs/user-guide/plugins/ansible-runner.md index 7388e3779..37bf722db 100644 --- a/docs/user-guide/plugins/ansible-runner.md +++ b/docs/user-guide/plugins/ansible-runner.md @@ -1,7 +1,7 @@ # Ansible Runner ## Introduction -The **Ansible Runner** plugin by Devtron enables seamless execution of Ansible Playbooks within your Devtron workflows using the ansible-runner tool. For example, user can use this plugin to trigger the Ansible Plabooks which can automate task like configuring cluster add-ons, managing node configurations, and network configurations. +The **Ansible Runner** plugin by Devtron enables seamless execution of Ansible Playbooks within your Devtron workflows using the Ansible Runner tool. For example, users can use this plugin to trigger the Ansible Playbooks which can automate tasks like configuring cluster add-ons managing node configurations, and network configurations. ### Prerequisites Before integrating the **Ansible Runner** plugin make sure that you have properly configured Ansible playbooks. From 13255a1d980930219c1491c5e8f051bca3801b4c Mon Sep 17 00:00:00 2001 From: Bhushan Nemade Date: Fri, 6 Dec 2024 13:00:48 +0530 Subject: [PATCH 6/6] Steps updated for Job flow --- docs/user-guide/plugins/ansible-runner.md | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/user-guide/plugins/ansible-runner.md b/docs/user-guide/plugins/ansible-runner.md index 37bf722db..1c5f71f0b 100644 --- a/docs/user-guide/plugins/ansible-runner.md +++ b/docs/user-guide/plugins/ansible-runner.md @@ -9,19 +9,19 @@ Before integrating the **Ansible Runner** plugin make sure that you have properl --- ## Steps -1. Go to **Applications** → **Devtron Apps**. -2. Click your application. -3. Go to **App Configuration** → **Workflow Editor**. -4. Click **New Workflow** and navigate to the **Build and Deploy from Source Code**. -5. Fill the required fields in the **Create build pipeline** window and navigate to the **Pre-build stage**. - -{% hint style="warning" %} -If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. -{% endhint %} - -6. Under 'TASKS', click the **+ Add task** button. -7. Click the **Ansible Runner** plugin. -8. Enter the following [user inputs](#user-inputs) with appropriate values. +1. Navigate to the **Jobs** section, click **Create**, and choose **Job**. +2. In the 'Create job' window, enter **Job Name** and choose a target project. +3. Click **Create Job**. +4. In the 'Configurations' tab, fill the required fields under the 'Source code' section and click **Save**. +5. In Workflow Editor, click **+ Job Pipeline**. +6. Give a name to the workflow and click **Create Workflow**. +7. Click **Add job pipeline to this workflow**. +8. Fill the required fields in ‘Basic configuration’ tab. +9. Go to the ‘Tasks to be executed’ tab. +10. Under ‘Tasks’, click the **+ Add task** button. +11. Select the **Ansible Runner** plugin. +12. Enter the following [user inputs](#user-inputs) with appropriate values. + --- ## User Inputs