について
バージョン管理は、環境とバージョンの組み合わせを通じて機能します。
stateDiagram-v2
V2: バージョン 2
V22: バージョン 2 <br/>(手動で適用)
V23: バージョン 2 <br/>(開発から昇格)
V24: バージョン 2 <br/>(ステージングから昇格)
Revert: プロダクション (ロールバック)
V1: バージョン 1 <br/>(問題のためロールバック)
V2 --> Development
Development --> Staging
Staging --> Production
Production --> Revert
state Development {
V22
}
note right of Development
各レベルで、テストしてからバージョンを昇格させます。
end note
state Staging {
V23
}
state Production {
V24
}
state Revert {
V1
}
note right of Revert
環境に昇格された後、バージョンはロールバックできます。
end note
An environment is a place to test different versions of your zone configurations.
バージョン管理を有効にすると、デフォルトの環境を作成する能力が得られます:
- Development: Meant to validate that changes work correctly. The default traffic filters are that the
cf.zone.namematches your zone name, theEdge Server IPis a specific value, and the request contains a cookie withdevelopment=true. - Staging: Meant to test changes before sending them to Production. The default traffic filters are that the
cf.zone.namematches your zone name and theEdge Server IPis a specific value. - Production: Meant to hold all configurations applied to your zone. You cannot edit the traffic filters - which are just that the
cf.zone.nameis equal to your zone’s name - and cannot delete this environment. This environment has a read-only check enabled, so versions promoted to this environment will become read-only as well.
新しいバージョンを作成すると、そのバージョンは開発環境(または最も低いランクの環境)に適用可能になります。開発環境でバージョンをテストした後、そのバージョンをステージング環境に昇格させ、問題がなければプロダクションに昇格させます。
特定の環境にトラフィックを送信するには、その環境のトラフィックフィルターで指定されたパターンに一致するリクエストをその環境に送信します。
A version is a collection of configurations related to your zone, such as WAF custom rules and other optimization configurations.
Once you enable Version Management, Cloudflare will automatically create:
- Version Zero, think about this as the configuration of your current zone. Once default environments are created, Version Zero is automatically deployed to them, guaranteeing no disruption in your live traffic. This Version is also permanently editable. In case you decide to disable Zone Versioning, Version Zero will become your zone again.
- Global Configuration, you can find all the configurations here that are not supported by Version Management.
On the Environments page, you can create default environments for Production, Staging, and Development.
バージョンが準備できたら、さまざまな環境を通じてテストし、昇格させてプロダクション(または最終環境)に到達させます。
既存のバージョンをクローンすることを選択することで、いつでも新しいバージョンを作成できます。これにより、既存のバージョンから設定が自動的にコピーされます。
バージョンの設定は、バージョンを昇格させるときにゾーントラフィックに適用され、その後、トラフィックフィルターで指定されたパターンに一致するトラフィックをその環境に送信します。