MENU
      シナリオ作成

        シナリオ作成


        記事の要約

        概要

        SourceDeployプロジェクトのシナリオを作成します。

        リクエスト

        API URL

        POST 	{SOURCEDEPLOY_API_URL}/project/{projectId}/stage/{stageId}/scenario
        Plain text

        リクエスト Parameter

        項目タイプ説明備考
        projectIdstringプロジェクト IDprojectList照会
        stageIdstringstage IDstageList照会

        リクエスト Query

        なし

        リクエスト Body

        {
            "name": "string",
            "description": "string",
            "config": "TScenarioServer" | "TScenarioAutoScalingGroup" | "TSecnarioKubernetesService" | "TSecnarioObjectStorage"
        }
        JSON
        項目タイプ必須有無説明備考
        namestringYシナリオ名
        descriptionstringNシナリオの説明
        ConfigTScenarioServer | TScenarioAutoScalingGroup| TSecnarioKubernetesService|TSecnarioObjectStorageYシナリオ設定stageDetail APIで stage typeを照会
        stage type="Server"の場合、TScenarioServer
        stage type="AutoScalingGroup"の場合、TScenarioAutoScalingGroup
        stage type="KubernetesService"の場合、TSecnarioKubernetesService
        stage type="ObjectStroage"の場合、TSecnarioObjectStorage

        TScenarioServer

        {
            "strategy": "string",
            "sequence": "boolean",
            "file": {
                "type": "string",
                "ObjectStorage": {
                    "bucket": "string",
                    "object": "string"
                },
                "SourceBuild": {
                    "id": "number"
                }
            },
            "rollback": "boolean",
            "cmd": {
                "pre": [
                    {
                        "user": "string",
                        "cmd": "string"
                    }
                ],
                "deploy": [
                    {
                        "sourcePath": "string",
                        "deployPath": "string"
                    }
                ],
                "post": [
                    {
                        "user": "string",
                        "cmd": "string"
                    }
                ]
            },
        }
        JSON
        項目タイプ必須有無Default説明備考
        strategystringYリリース戦略"normal"
        sequencebooleanNtrue順次リリースの有無false入力時に同時リリース
        file.typestringYリリースファイルの type"ObjectStorage" | "SourceBuild" | "later"
        file.ObjectStorage.bucketstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorageバケット名objectStorageBucketList APIで照会
        file.ObjectStorage.objectstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorage objectの位置objectstorageobjectlist APIで照会
        file.SourceBuild.idnumberN
        (file.type=SourceBuildの場合、必須)
        SourceBuild idsourceBuildList APIで照会
        rollbackbooleanYリリース失敗時にロールバック
        cmd.pre.userstringNリリース前に実行>実行アカウント
        cmd.pre.cmdstringNリリース前に実行>実行コマンド
        cmd.deploy.sourcePathstringNファイルリリース>ソースファイルパス
        cmd.deploy.deployPathstringNファイルリリース>リリースパス
        cmd.post.userstringNリリース後に実行>実行アカウント
        cmd.post.cmdstringNリリース後に実行>実行コマンド

        TScenarioAutoScalingGroup

        {
            "strategy": "string",
            "sequence": "boolean",
            "file": {
                "type": "string",
                "ObjectStorage": {
                    "bucket": "string",
                    "object": "string"
                },
                "SourceBuild": {
                    "id": "number"
                 }
            },
            "rollback": "boolean",
            "cmd": {
                "pre": [
                    {
                        "user": "string",
                        "cmd": "string"
                    }
                ],
                "deploy": [
                    {
                        "sourcePath": "string",
                        "deployPath": "string"
                    }
                ],
                "post": [
                    {
                        "user": "string",
                        "cmd": "string"
                    }
                ]
            },
            "loadBalancer": {
                "loadBalancerTargetGroupNo": "number",
                "deleteAsg": "boolean",
                "deleteServer": "boolean"
            }
        }
        JSON
        項目タイプ必須有無Default説明備考
        strategystringYリリース戦略"normal" | "blueGreen"
        sequencebooleanNtrue順次リリースの有無false入力時に同時リリース
        file.typestringYリリースファイルの type"ObjectStorage" | "SourceBuild" | "later"
        file.ObjectStorage.bucketstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorageバケット名objectStorageBucketList APIで照会
        file.ObjectStorage.objectstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorage objectの位置objectstorageobjectlist APIで照会
        file.SourceBuild.idnumberN
        (file.type=SourceBuildの場合、必須)
        SourceBuild idsourceBuildList APIで照会
        rollbackbooleanYリリース失敗時にロールバック
        cmd.pre.userstringNリリース前に実行>実行アカウント
        cmd.pre.cmdstringNリリース前に実行>実行コマンド
        cmd.deploy.sourcePathstringNファイルリリース>ソースファイルパス
        cmd.deploy.deployPathstringNファイルリリース>リリースパス
        cmd.post.userstringNリリース後に実行>実行アカウント
        cmd.post.cmdstringNリリース後に実行>実行コマンド
        loadBalancer.loadBalancerTargetGroupNonumberN
        (strategy=blueGreenの場合、必須)
        ロードバランサの Target Group notargetGroupList APIで照会
        loadBalancer.deleteAsgbooleanN
        (strategy=blueGreenの場合、任意)
        false既存の Auto Scaling Groupの削除有無
        loadBalancer.deleteServerbooleanN
        (strategy=blueGreenの場合、必須)
        既存の Auto Scaling Group内のサーバ削除有無loadBalancer.deleteAsgの値が trueの場合、trueのみ入力可能

        TSecnarioKubernetesService

        {
         {
        
            "manifest": {
                "type": "string",
                "repository": "string",
                "branch": "string",
                "path": ["string"]
            },
            "strategy": "string",
            "canaryConfig": {
                "canaryCount": "number",
                "analysisType": "string",
                "timeout": "number",
                "prometheus": "string",
                "env": {
                    "baseline": "string",
                    "canary": "string"
                },
                "metrics": [
                    {
                        "name": "string",
                        "successCriteria": "string",
                        "queryType": "string",
                        "weight": "number",
                        "metric": "string",
                        "filter": "string",
                        "query": "string"
                    }
                ],
                "analysisConfig": {
                    "duration": "number",
                    "delay": "number",
                    "interval": "number",
                    "step": "number"
                },
                "passScore": "number"
            }
        }
        JSON
        項目タイプ必須有無説明備考
        strategystringYリリース戦略"rolling" | "blueGreen" | "canary"
        manifest.typestringYマニフェストファイルの保存場所"SourceCommit"
        manifest.repositorystringYリポジトリsourceCommitRepostiroyList APIで照会
        manifest.branchstringYリポジトリブランチsourceCommitBranchList APIで照会
        manifest.pathstring[]Yファイルの保存場所
        canaryConfig.analysisTypestringN
        (strategy=canaryの場合、必須)
        Canary解析方法"manual" | "auto"
        canaryConfig.timeoutnumberN
        (strategy=canary &
        canaryConfig.analysisType=manualの場合、必須)
        リリース/キャンセルの最大時間
        canaryConfig.canaryCountnumberN
        (canaryConfig.analysisType=autoの場合、必須)
        Baseline、Canary Podの数
        canaryConfig.prometheusstringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        Prometheus Url
        canaryConfig.env.baselinestringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        解析環境変数 > baseline
        canaryConfig.env.canarystringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        解析環境変数 > canary
        canaryConfig.metrics.namestringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        メトリック名
        canaryConfig.metrics.successCriteriastringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        成功基準"base" | "canary"
        canaryConfig.metrics.queryTypestringN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        クエリタイプ"default" | "promQL"
        canaryConfig.metrics.weightnumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        重み付け
        canaryConfig.metrics.metricstringN
        (strategy=canary & canaryConfig.analysisType=auto &canaryConfig.metrics.queryType="default"の場合、必須)
        メトリック
        canaryConfig.metrics.filterstringN
        (strategy=canary & canaryConfig.analysisType=auto & canaryConfig.metrics.queryType="default"の場合、必須)
        Filter
        canaryConfig.metrics.querystringN
        (strategy=canary & canaryConfig.analysisType=auto & canaryConfig.metrics.queryType="promQL"の場合、必須)
        クエリ
        canaryConfig.analysisConfig.durationnumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        分析時間
        canaryConfig.analysisConfig.delaynumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        分析遅延時間
        canaryConfig.analysisConfig.intervalnumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        分析の周期
        canaryConfig.analysisConfig.stepnumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        Metricの収集周期
        canaryConfig.passScorenumberN
        (strategy=canary & canaryConfig.analysisType=autoの場合、必須)
        解析成功スコア

        TSecnarioObjectStorage

        {
            "file": {
                "type": "string",
                "ObjectStorage": {
                    "bucket": "string",
                    "object": "string"
                },
                "SourceBuild": {
                    "id": "number"
                }
            },
            "path": [
                    {
                        "sourcePath": "string",
                        "deployPath": "string"
                    }
            ]
        }
        JSON
        項目タイプ必須有無説明備考
        file.typestringYリリースファイルの type"ObjectStorage" | "SourceBuild" | "later"
        file.ObjectStorage.bucketstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorageバケット名objectStorageBucketList APIで照会
        file.ObjectStorage.objectstringN
        (file.type=ObjectStorageの場合、必須)
        ObjectStorage objectの位置objectstorageobjectlist APIで照会
        file.SourceBuild.idnumberN
        (file.type=SourceBuildの場合、必須)
        SourceBuild idsourceBuildList APIで照会
        path.sourcePathstringNソースファイルのパス
        path.deployPathstringNリリースパス

        レスポンス

        レスポンス Body

        {
        	"id": "number",
        	"name": "string"
        }
        JSON
        項目タイプ説明備考
        idnumberシナリオ id
        namestringシナリオ名

        この記事は役に立ちましたか?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.