(Helm Chart Deployment) Adding Build/Deployment
The user can create a new build pipeline in an already created DevOps Console project and build the source to create an image and deploy it to a Kubernetes cluster through the following procedure.
The Helm Release deployed through Helm Installation will be used in Deploy to K8S Stage Settings.
Start Adding Build/Deployment
To start adding build/deployment, follow the procedure below.
- Click the Project card on the Main page. It will move to the Project Dashboard page.
Adding Code Repository (Option)
| Repository Type | App. template with source code + DevOps Console registered tool / DevOps Code | App. template with source code + DevOps Console unregistered tool | App. template without source code (Environment Only) + DevOps Console registered tool / DevOps Code | App. template without source code (Environment Only) + DevOps Console unregistered tool |
|---|---|---|---|---|
| New Repository Creation | ○ | X | ○ | X |
| Existing Repository Use | X | X | ○ | ○ |
To add a code repository, follow the procedure below.
- Click the Project card on the Main page. It will move to the Project Dashboard page.
- Click Repository > Code Repository in the left menu.
- Click the Add Code Repository button at the top right. The Add Code Repository page will open.
- Enter/set each item and click the Connection Test button.
- Click the Save button to complete Add Code Repository.
| Item | Description |
|---|---|
| Repository Type | Select the type of repository to use
|
| New/Existing Usage | Select whether to Create a New Repository or Use an Existing Repository
|
| Repository Information | Enter repository information
|
| Authentication Information | Enter authentication information. |
| Repository Information | Enter repository information
|
Adding Image Repository (Option)
To add an image repository, follow the procedure below.
Adding App Image Repository
- Image Repository page, click the App Image Repository Addition button in the top right. Move to the App Image Repository Addition page.
- On the App Image Repository Addition page, enter/settings for each item.
- Click the Connection Test button.
- Click the Save button.
| Item | Description |
|---|---|
| Repository Type Selection | Select the image repository type. If you want to use an image repository not registered in Devops Console, select the Image Registry type. |
| Repository Creation Selection | Choose whether to create a new repository or use an existing one.
|
| Registered Tool | Enter repository information. |
| Unregistered Tool | Enter repository information
|
Adding Pull-only Image Repository
- Image Repository page, click the Add Pull-only Image Repository button at the top right. It moves to the Add Pull-only Image Repository page.
- On the Add Pull-only Image Repository page, enter/set each item.
- Click the Connection Test button.
- Click the Save button.
Helm Installation
To install Helm, follow the procedure below.
- Click the Project card on the Main page. It will move to the Project Dashboard page.
- Click Build/Deployment > Helm Installation in the left menu.
- Select the K8S cluster to install in the K8S cluster item.
- Click the desired Helm chart to move to the Helm Chart Details screen.
- Click the Helm Installation button. It will move to the Helm Chart Installation screen.
- Enter each item and click the Next button.
Item Description Release Name Enter the name to use for the Helm chart release.
It must be unique and not duplicated within the namespace.Type Development, operation Version Select the version of the chart to install Helm. K8S Cluster Displays the target K8S cluster for Helm installation.
It cannot be changed, and if a change is desired, select the K8S cluster in Helm Installation Start.Namespace Select the target namespace for Helm installation from the list. Reference Information Reference information provided by the selected K8S cluster.
Click each tab to check detailed information.Chart Included Default Values.yaml The values.yamlfile can be modified to run Helm installation with the desired value.
If necessary, check the reference information and modify thevalues.yamlfile with the corresponding value.Input Type The input type item is only displayed for Helm charts that support form input. - Form: Enter the items displayed on the screen. Refer to Form Input Support Helm Chart Creation for Helm chart creation that supports form input.
values.yaml: Modify the value in the general Helm chart yaml editor screen.
Form Input The screen displayed when Form is selected as the input type, check each item, and enter the value. After entering, click the Validation Check button to verify the input value. Table. Helm Installation Setting Items - The Helm Chart Installation popup window will open. Click the Run button to complete Helm installation.
- Once the installation is complete, the Kubernetes deployment page will open.
Adding Build Pipeline
To add a build pipeline, follow the procedure below.
- Main page, click the Project card. Move to the Project Dashboard page.
- Click the Build/Deployment > Build Pipeline menu in the left menu. Move to the Build Pipeline page.
- On the Build Pipeline page, click the Add Pipeline button at the top right. Move to the Add Pipeline page.
- Enter/set each item on the Add Pipeline page.
- Click the Next button.
| Item | Description |
|---|---|
| Classification | Select development or operation classification
|
| Jenkins URL | Select Jenkins to add a build pipeline from the list. |
| Build Agent | Select the agent (build environment) where the build pipeline will run. Click the Info icon to view the list of tools provided by the agent. |
| Build Environment OS | Displays the OS information of the environment where the build agent runs. |
| Folder Type | Select the folder type.
|
| Folder | Select a folder from the list or enter the name of the new folder to be created. |
| Pipeline Name | Enter the pipeline name. |
| Parameter Setting | Set the parameters to be used in the pipeline. |
| Environment Variable Setting | Set the environment variables to be used in the pipeline. |
| Stage Setting | Set the stages to be used in the pipeline. |
| Build Result Email Recipient Setting | Set the recipient to receive the result email after the pipeline is completed (success/failure). |
Setting Parameters
To set parameters to use when running the pipeline, follow the procedure below.
- Click the Parameters area. The Parameter Registration page will open on the right.
- Click the Add button to open the Add Parameter popup window.
- Add parameters and click the Apply button to complete parameter settings.
Setting Environment Variables
To set environment variables to be used in the pipeline, follow the procedure below.
- Environment Variables section, click. The Environment Variable Registration page opens on the right.
- A list of pre-registered Environment Variables appears, and select the checkbox of the environment variable to be used.
- Check the Selected Environment Variables and click the Apply button to complete the environment variable setting.
Setting Build Result Email Recipients
To set up the recipient to receive the build result by email, follow the procedure below.
- Email Recipient area, click. The Add Email Recipient page opens on the right.
- In the Search area, search for and add the recipient.
- Click the Apply button to complete the email recipient setting.
Setting Additional Stages
Setting Checkout Stage
To add a Checkout stage, follow the procedure below.
- Click the New Stage area. The stage setting page will open on the right.
- Select Checkout as the Stage Type.
- Enter information and click Apply. (The code repository added in Adding Code Repository (Option) can be selected from the URL.)
| Item | Description |
|---|---|
| URL | Select the code repository to perform checkout. |
| Branch Name | Enter the branch name to checkout. |
Setting Build Stage
To add a Build stage, follow these steps:
- Click the plus icon to add a new stage.
- Click the new stage area. The Stage Settings page opens on the right.
- On the Stage Settings page, select Build as the Stage Type.
- On the Stage Settings page, enter the information and click the Apply button.
| Item | Description |
|---|---|
| Language | Select the programming language used by the application. |
| Build Tool | Select the Build tool used for application building. Provides default Shell commands based on the selected Build tool. |
| Shell Command | Enter the command to use for application building. All commands available in the Shell can be used. |
Setting Docker Build Stage
To add a Docker Build stage, follow these steps:
- Plus icon을 클릭하여 새로운 스테이지를 추가하세요.
- New Stage 영역을 클릭하세요. Stage Settings 페이지가 오른쪽에 열립니다.
- Stage Type으로 Docker Build를 선택하세요.
- 정보 입력 후 Apply 버튼을 클릭하세요. (Registry URL에서 Adding Image Repository (Option)에서 추가한 이미지 저장소를 선택할 수 있습니다.)
Item | Description | Example |
|---|---|---|
Registry URL (docker push) | Select the image repository where the completed Docker build result image will be pushed. | |
| ID | ID value of the account to be used in the image repository | |
| Image Tag Pattern | The Docker image tag will be automatically generated based on the selected pattern.
|
|
| Add Base Image Repository | The Add Base Image Repository popup window will open.
| |
Registry URL (docker pull) | If the image repository providing the base image (Dockerfile’s FROM clause, docker pull) used in the Dockerfile and the image repository of the Registry URL (docker push) are different, select the image repository for docker pull. | |
| Image Build Tool | Displays the image build tool. | |
| Pre-build Command | If there are commands that must be executed before building the Docker image, write them in Shell command format. | cp target/*.jar docker/ |
| Image Build Folder | If the Docker image build needs to be executed in a specific folder, select the checkbox and enter the folder path. | docker |
| Dockerfile | Enter the Dockerfile file name. | Dockerfile |
| Image Build Options | If additional options are required for the image build tool, enter them. | --no-cache |
| Build Command | Displays the actual image build command to be executed. | |
| Post-build Command | If there are commands that must be executed after building the Docker image, write them in Shell command format. | rm -rf docker/*.jar |
Setting Deploy to K8S Stage
To add a Deploy to K8S stage, follow the procedure below.
- Click the Add icon to add a new stage.
- Click the New Stage area. The stage setting page will open on the right.
- Select Deploy to K8S as the Stage Type.
- Enter information and click the Apply button. (When selecting Helm Release (Helm Chart Type) in Type, the Helm release added in Helm Installation can be selected.)
Item | Description |
|---|---|
| Type | Select deployment type
|
| K8S Cluster | Select K8S cluster
|
| Namespace | Select namespace. |
| Helm Release | Select Helm release. |
| Deployment Method | Select deployment method
|
| Registry URL | Select the image repository where the image to be deployed to Kubernetes is docker pushed. |
| Secret | Select secret information input method
|
Checking Final Pipeline Script
- Check the actual build pipeline script to be created. Modify the script directly if necessary.
- Click the Complete button to complete adding the pipeline.