Cloud Deployment Manager akan mencapai akhir dukungan pada 31 Desember 2025. Jika saat ini Anda menggunakan Deployment Manager, migrasikan ke Infrastructure Manager atau teknologi deployment alternatif paling lambat 31 Desember 2025 untuk memastikan layanan Anda berlanjut tanpa gangguan.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini memberikan ringkasan fitur Runtime Configurator dan menjelaskan konsep utama terkait Runtime Configurator. Untuk mempelajari cara membuat resource RuntimeConfig, baca Membuat dan Menghapus Resource RuntimeConfig.
Apa yang dimaksud dengan Runtime Configurator?
Fitur Runtime Configurator memungkinkan Anda menentukan dan menyimpan data sebagai hierarki pasangan nilai kunci di Google Cloud Platform. Anda dapat menggunakan pasangan nilai kunci ini
sebagai cara untuk:
Mengonfigurasi layanan secara dinamis
Mengomunikasikan status layanan
Mengirim notifikasi perubahan pada data
Membagikan informasi di antara beberapa tingkat layanan
Misalnya, bayangkan skenario saat Anda memiliki cluster node yang menjalankan prosedur startup. Selama proses startup, Anda dapat mengonfigurasi node untuk melaporkan
statusnya ke Runtime Configurator, lalu membuat aplikasi lain
mengirimkan kueri ke Runtime Configurator dan menjalankan tugas tertentu berdasarkan status
node.
Configurator Runtime juga menawarkan layanan Watcher dan layanan Waiter.
Layanan Watcher memantau pasangan kunci tertentu dan ditampilkan saat nilai pasangan kunci berubah, sementara layanan Waiter menunggu kondisi akhir tertentu dan menampilkan respons setelah kondisi akhir tersebut terpenuhi.
Anda menggunakan Runtime Configurator melalui gcloud CLI, atau sebagai API mandiri.
Konsep
Resource konfigurasi
Resource Konfigurasi berisi daftar variabel hierarkis. Anda
dapat membuat konfigurasi yang berbeda untuk tujuan yang berbeda. Misalnya, Anda
dapat memisahkan konfigurasi berdasarkan lingkungan (prod, dev, test), berdasarkan
tingkatan aplikasi atau layanan yang berbeda (backend, frontend),
atau berdasarkan entitas (satu konfigurasi per pengguna aplikasi Anda).
Variabel
Variabel adalah key-value pair yang termasuk dalam resource RuntimeConfig.
Kunci variabel memiliki format berikut:
Anda dapat menyetel, mendapatkan, dan memantau nilai variabel untuk menyampaikan informasi ke aplikasi Anda, untuk menandakan status selesai, untuk mengirim notifikasi perubahan data, dan lainnya. Variabel bersifat hierarkis, sehingga kunci variabel Anda dapat memiliki beberapa tingkat. Misalnya, contoh kunci variabel dapat berupa:
Anda dapat menggunakan metode watch() untuk memantau variabel dan kembali saat
variabel berubah, waktu tunggu watcher habis, atau watcher dihapus. Gunakan fungsi
watch() untuk mengonfigurasi aplikasi Anda secara dinamis berdasarkan
perubahan pada data Anda.
Pelayan
Jika Anda membuat resource Waiter untuk memantau awalan jalur tertentu, waiter akan ditampilkan setelah jumlah variabel di bawah awalan mencapai jumlah tertentu. Hal ini disebut sebagai
Kondisi kardinalitas.
Misalnya, jika Anda menetapkan kondisi untuk jalur /foo dan jumlah
jalur ditetapkan ke 2, penyiapan berikut akan memenuhi kondisi:
/foo/variable1 = "value1"
/foo/variable2 = "value2"
/bar/variable3 = "value3" # Not /foo path
Waiter memiliki kondisi kegagalan dan keberhasilan yang dapat Anda tetapkan.
Setelah Anda membuat Waiter, layanan akan menampilkan objek operasi yang Anda
polling untuk penyelesaian. Operasi selesai jika salah satu dari
berikut terjadi:
Kondisi success terpenuhi.
Kondisi failure terpenuhi.
Waiter mencapai batas waktu tunggu yang ditentukan dalam permintaan
awal.
Penggunaan waiter sangat ideal untuk skenario startup, di mana Anda mungkin perlu menjeda
deployment hingga sejumlah layanan tertentu berjalan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[[["\u003cp\u003eRuntime Configurator allows you to define and store data as key-value pairs in Google Cloud Platform, enabling dynamic service configuration, communication of service states, and sharing of information across service tiers.\u003c/p\u003e\n"],["\u003cp\u003eThe Config resource contains a hierarchical list of variables, allowing for different configurations based on environments, service tiers, or entities, while Variables, formatted as key-value pairs, facilitate data communication, status updates, and change notifications.\u003c/p\u003e\n"],["\u003cp\u003eWatchers and Waiters are key services within Runtime Configurator, where Watchers monitor variables for changes and Waiters await specific conditions to be met, such as a certain number of variables under a prefix.\u003c/p\u003e\n"],["\u003cp\u003eRuntime Configurator can be used via the gcloud CLI or as a standalone API, offering flexibility in how you manage and interact with your configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe Beta status of the service means it is subject to the Pre-GA Offerings Terms and has limited support, users should also consult the relevant documentation for details on its launch stage.\u003c/p\u003e\n"]]],[],null,["# Runtime Configurator Fundamentals\n\n| **Beta**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis document provides an overview of the Runtime Configurator feature and\ndescribes the key concepts related to Runtime Configurator. To learn\nhow to create a RuntimeConfig resource, read\n[Creating and Deleting RuntimeConfig Resources](/deployment-manager/runtime-configurator/create-and-delete-runtimeconfig-resources).\n\nWhat is Runtime Configurator?\n-----------------------------\n\nThe Runtime Configurator feature lets you define and store data as a hierarchy\nof key value pairs in Google Cloud Platform. You can use these key value pairs\nas a way to:\n\n- Dynamically configure services\n- Communicate service states\n- Send notification of changes to data\n- Share information between multiple tiers of services\n\nFor example, imagine a scenario where you have a cluster of nodes that run a\nstartup procedure. During startup, you can configure your nodes to report\ntheir status to the Runtime Configurator, and then have another application\nquery the Runtime Configurator and run specific tasks based on the status of the\nnodes.\n\nThe Runtime Configurator also offers a Watcher service and a Waiter service.\nThe Watcher service watches a specific key pair and returns when the value of\nthe key pair changes, while the Waiter service waits for a specific end\ncondition and returns a response once that end condition has been met.\n\nYou use Runtime Configurator through using the gcloud CLI, or as a\nstandalone API.\n\n\u003cbr /\u003e\n\nConcepts\n--------\n\n- **Config resource**\n\n A Config resource contains a hierarchical list of variables. You\n can create different configurations for different purposes. For example, you\n can separate configurations based on environment (prod, dev, test), based\n on different tiers of applications or services (back end, front end),\n or based on entities (one configuration per user of your\n application).\n- **Variables**\n\n Variables are key value pairs that belong to a RuntimeConfig resource.\n Variable keys have the following format: \n\n projects/[project_id]/configs/[CONFIG_ID]/variables/[VARIABLE_NAME]\n\n You can set, get, and watch variable values to communicate information to\n your applications, to signal a completed state, to send notification of data\n changes, and more. Variables are hierarchical, so your variable key could\n have several levels. For example, sample variable keys could be: \n\n webserver-1/users/name\n webserver-1/users/favorite_color\n\n- **Watchers**\n\n You can use the `watch()` method to watch a variable and return when the\n variable changes, the watcher times out, or the watcher is deleted. Use the\n `watch()` functionality to dynamically configure your applications based on\n changes in your data.\n- **Waiters**\n\n If you create a Waiter resource to watch a specific path prefix, the waiter\n returns once the number of variables under the prefix reaches a particular\n amount. This is referred to as a\n [Cardinality condition](/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.waiters#Cardinality).\n\n For example, if you set a condition for the path `/foo` and the number\n of paths is set to 2, the following setup would meet the condition:\n - `/foo/variable1 = \"value1\"`\n - `/foo/variable2 = \"value2\"`\n - `/bar/variable3 = \"value3\" # Not /foo path`\n\n A waiter has both a failure and success condition that you can set.\n\n After you create a Waiter, the service returns an operation object that you\n poll for completion. The operation is complete when the one of the\n following occurs:\n - The `success` condition is met.\n - The `failure` condition is met.\n - The Waiter reached the timeout deadline specified in the initial request.\n\n Using a waiter is ideal for startup scenarios, where you might need to pause\n a deployment until a certain number of services is running.\n\nWhat's next\n-----------\n\n- [Creating a RuntimeConfig resource](/deployment-manager/runtime-configurator/create-and-delete-runtimeconfig-resources).\n- [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables).\n- [Watching a Specific Variable](/deployment-manager/runtime-configurator/watching-a-variable).\n- [Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter).\n- Refer to the [v1beta1 reference](/deployment-manager/runtime-configurator/reference/rest).\n- Refer to the [Quotas for Runtime Configurator](/deployment-manager/pricing-and-quotas#runtime_configurator)."]]