0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Puppet Pipelines for ApplicationsでNode.jsサンプルアプリケーションのデリバリーパイプラインを作る

Posted at

この記事はこちらの続編です。デリバリーパイプラインを作ってみました。

前提

  • GitHubのアカウントを持っている
  • PCにgitがインストールされていてgit add, commit, push等基本的な操作を習得している
  • AWS, Azure, GCP等のクラウドプラットフォームを利用できる

手順

デリバリーターゲットの作成

アプリケーションのデリバリー先となる環境を作成します。この記事ではdevelopment, qa, staging, productionの4つのステージを作成します。Environmentsをクリック、右側の+Create Environmentをクリックします。

Environment Nameにdevelopmentを入力してCreateを押します。同じ手順でqa, staging, productionを作成します。

Environmentに紐付けるサーバを設定します。トップバーのServersをクリック、Add Serverを押します。Add Existing Serverを押してPipelinesのAgentインストール手順に従いAgentをインストールします。インストール完了後、サーバを選択してAdd Environmentsを押し、development, qa, staging, productionの各Environmentにサーバを追加します。

$ curl -sSL https://pipelines.puppet.com/download/client | sh
$ sudo /usr/local/bin/distelli agent install
Distelli Email: hisashi.yamaguchi@puppet.com
      Password:

デリバリーパイプラインの作成

トップバーのApplications -> PFA_NodeJS_SampleAppをクリックし右下のCreate Targetを押します。

Existing Environmentからdevelopmentを選択してAdd Targetを押します。同様の手順でqa, staging, productionの順で追加します。

右側のデリバリーパイプラインでAuto Deployチェックボックスを全てチェックします。

承認ゲートの作成

production -> Environments -> Environment Settings -> DeploymentをクリックしてSet Approval Permissionsをチェックし、あらかじめ作成済みのグループを選択してSaveを押します。
グループの作成手順は割愛しています。

動作確認

READMEを編集してリモートリポジトリにコミット、自動的にデリバリーパイプラインが流れるか確認します。NEW EVENTSが表示されてその後各々のターゲットにデリバリーされればデリバリーは成功です。

$ vi README
update.
$ git push origin master

productionのPendingApprovalをクリックします。

Approve and Deployを押します。

緑色の画面が表示されればディプロイも成功です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?