CD(継続的デリバリー)とは? CI(継続的インテグレーション)によって生み出された成果物(アーティファクト)を、実際の環境(ステージングや プロダクション)へ自動的に配置すること • CI で生成された成果物をステージングやプロダクション環境へ反映 • CI でコンテナレジストリに格納したコンテナイメージを Kubernetes クラスタへ反映 CD 環境を整備することで、エンドユーザに影響を与えることなく、高頻度、安定かつ安全にアプリケーションのリリー スを実現。 (etc.)
で実現する CI/CD OCI DevOps CD コンピュート・インスタンス・グループへのデプロイでは、デプロイメント構成ファイルにアーティファクトのデプロイ先やデプロイ時に実行するコマンドを定義して、デ プロイメント・パイプラインから実行可能。 デプロイメント構成ファイルの利用によるコンピュート・インスタンス・グループへのデプロイ管理を効率化 version: 1.0 component: deployment runAs: root env: variables: version: ${appVersion} files: # This section is to define how the files in the artifact shall # be put on the compute instance - source: / destination: /tmp/genericArtifactDemo steps: # This section is to define the scripts that each step shall run on the instance after file copy. - stepType: Command name: Install Apache Web Server command: /tmp/genericArtifactDemo/install_dependencies.sh runAs: root timeoutInSeconds: 600 - stepType: Command name: Stop Web Server command: /tmp/genericArtifactDemo/stop.sh runAs: root timeoutInSeconds: 60 - stepType: Command name: Install New Version of Software command: /tmp/genericArtifactDemo/install.sh runAs: root timeoutInSeconds: 60 - stepType: Command name: Start Web Server command: /tmp/genericArtifactDemo/start.sh runAs: root timeoutInSeconds: 60 • ターゲット・コンピュート・インスタンスに格納するアプリケーショ ン・パッケージとその場所を指定 • アプリケーションのデプロイに必要なステップを指定 • デプロイメントに必要なユーザー定義変数または組込みの環 境変数を指定 OCI Documents https://docs.oracle.com/ja-jp/iaas/Content/devops/using/deployment_specs.htm Deployment Pipeline