Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add documentation after provider create #287

Merged
merged 2 commits into from
Mar 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions internal/cmd/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,41 @@ coder providers create my-provider --hostname=https://provider.example.com --clu
return xerrors.Errorf("create workspace provider: %w", err)
}

err = tablewriter.WriteTable(cmd.OutOrStdout(), 1, func(i int) interface{} {
return *wp
})
cemanagerURL := client.BaseURL()
version, err := client.APIVersion(ctx)
if err != nil {
return xerrors.Errorf("write table: %w", err)
return xerrors.Errorf("get application version: %w", err)
}

clog.LogSuccess(fmt.Sprintf(`
Created workspace provider "%s"
`, createReq.Name))
_ = tablewriter.WriteTable(cmd.OutOrStdout(), 1, func(i int) interface{} {
return *wp
})
_, _ = fmt.Fprint(cmd.OutOrStdout(), `
Now that the workspace provider is provisioned, it must be deployed into the cluster. To learn more,
visit https://coder.com/docs/guides/deploying-workspace-provider

When connected to the cluster you wish to deploy onto, use the following helm command:

helm upgrade coder-workspace-provider coder/workspace-provider \
--version=`+version+` \
--atomic \
--install \
--force \
--set envproxy.token=`+wp.EnvproxyToken+` \
--set ingress.host=`+hostname+` \
--set envproxy.clusterAddress=`+clusterAddress+` \
--set cemanager.AccessURL=`+cemanagerURL.String()+`

WARNING: The 'envproxy.token' is a secret value that authenticates the workspace provider,
make sure not to share this token or make it public.

Other values can be set on the helm chart to further customize the deployment, see
https:/github.com/cdr/enterprise-helm/blob/workspace-providers-envproxy-only/README.md
`)

return nil
},
}
Expand Down