env: status page
Updates page asynchronously every 5 seconds.
Introduces beforeStart and afterStart trigger points to update setup status information.
Change-Id: Ic2f6a9bb7a0fefeefc4d6a1a7338d506a4f99e80
diff --git a/core/installer/tasks/init.go b/core/installer/tasks/init.go
index e6dd47e..cb546c1 100644
--- a/core/installer/tasks/init.go
+++ b/core/installer/tasks/init.go
@@ -10,8 +10,8 @@
)
func SetupConfigRepoTask(env Env, st *state) Task {
- return newSequentialParentTask(
- "Configure Git repository for new environment",
+ ret := newSequentialParentTask(
+ "Configure Git repository",
true,
newSequentialParentTask(
"Start up Git server",
@@ -29,6 +29,10 @@
ConfigureFirstAccount(env, st),
),
)
+ ret.beforeStart = func() {
+ st.infoListener("dodo is driven by GitOps, changes are committed to the repository before updating an environment. This unlocks functionalities such as: rolling back to old working state, migrating dodo to new infrastructure (for example from Cloud to on-prem).")
+ }
+ return ret
}
func NewCreateConfigRepoTask(env Env, st *state) Task {