|
| 1 | +--- |
| 2 | +partial_category: self-hosted |
| 3 | +partial_name: cloud-provider-config |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +When using public cloud providers, {props.edition} automatically downloads the required infrastructure provider images from our public registries to set up a workload cluster. |
| 9 | +For example, if you want to deploy an AWS cluster, {props.edition} downloads the required Amazon Machine Image (AMI) that contains the desired Operation System (OS) and Kubernetes binaries specified in the cluster profile. |
| 10 | +The exception to this is when you are using a custom image, in which case you must provide the image yourself through the Bring Your Own OS (BYOOS) <VersionedLink text="workflow" url="/byoos/image-builder/" />. |
| 11 | + |
| 12 | +In the event you need to enable new cloud providers, or rotate the credentials used to access our infrastructure provider images, you can do so through the [System API](https://docs.spectrocloud.com/api/v1/system/). |
| 13 | +Use the following steps to modify the cloud provider configuration for your self-hosted {props.edition} instance. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +- System administrator permissions, either a Root Administrator or Operations Administrator. Refer to the |
| 18 | + <PaletteVertexUrlMapper |
| 19 | + edition={props.edition} |
| 20 | + text="System Administrators" |
| 21 | + url="/system-management/account-management" |
| 22 | + /> page to learn more about system administrator roles. |
| 23 | + |
| 24 | +- You need cloud credentials from us to download the required infrastructure provider images. Reach out to our support team at [[email protected]](mailto:[email protected]) to obtain these credentials. |
| 25 | + |
| 26 | +- `curl` or similar tool to make API requests. |
| 27 | + |
| 28 | +## Update Cloud Provider Configuration |
| 29 | + |
| 30 | +1. Open a terminal session. |
| 31 | + |
| 32 | + |
| 33 | +2. Log in to the {props.edition} System API by using the `/v1/auth/syslogin` endpoint. Use the curl command below and replace the `example.com` placeholder URL with the URL of your {props.edition} instance. |
| 34 | +Ensure you replace the credentials below with your system console credentials. |
| 35 | + |
| 36 | + ```shell |
| 37 | + TOKEN=$(curl --insecure --location 'https://example.com/v1/auth/syslogin' \ |
| 38 | + --header 'Content-Type: application/json' \ |
| 39 | + --data '{ |
| 40 | + "password": "**********", |
| 41 | + "username": "**********" |
| 42 | + }') |
| 43 | + ``` |
| 44 | + |
| 45 | + The response will contain the authentication token that you will use in the next request. |
| 46 | + |
| 47 | + |
| 48 | +3. Next, prepare a payload for the cloud provider you want to enable or update. Select the tab for details on the expected payload for each cloud provider. |
| 49 | + |
| 50 | + Replace the placeholders in the payload below with the configuration values provided by our support team. |
| 51 | + |
| 52 | + <!-- prettier-ignore --> |
| 53 | + |
| 54 | + <Tabs groupId="provider"> |
| 55 | + <TabItem value="Azure" label="Azure"> |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + ```json |
| 60 | + CONFIG_JSON=$(cat <<EOF |
| 61 | + { |
| 62 | + "clientId": "**************", |
| 63 | + "clientSecret": "**************", |
| 64 | + "tenantId": "**************", |
| 65 | + "subscriptionId": "**************", |
| 66 | + "storage": { |
| 67 | + "accessKey": "**************", |
| 68 | + "storageName": "**************", |
| 69 | + "container": "**************" |
| 70 | + } |
| 71 | + } |
| 72 | + EOF |
| 73 | + ) |
| 74 | + ``` |
| 75 | + </TabItem> |
| 76 | + <TabItem value="AWS" label="AWS"> |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + ```json |
| 81 | + CONFIG_JSON=$(cat <<EOF |
| 82 | + { |
| 83 | + "accessKey": "**************", |
| 84 | + "secretKey": "**************" |
| 85 | + } |
| 86 | + EOF |
| 87 | + ) |
| 88 | + ``` |
| 89 | + </TabItem> |
| 90 | + <TabItem value="GCP" label="GCP"> |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + ```json |
| 95 | + CONFIG_JSON=$(cat <<EOF |
| 96 | + { |
| 97 | + "jsonCredentials": "**************" |
| 98 | + } |
| 99 | + EOF |
| 100 | + ) |
| 101 | + ``` |
| 102 | + </TabItem> |
| 103 | + |
| 104 | + </Tabs> |
| 105 | + |
| 106 | +4. Use the `/v1/system/config/:provider/account` endpoint to update the cloud provider configuration. Select the tab for the cloud provider you want to update and issue the corresponding curl command. Replace the `example.com` placeholder URL with the URL of your {props.edition} instance. |
| 107 | + |
| 108 | + <!-- prettier-ignore --> |
| 109 | + |
| 110 | + <Tabs groupId="provider"> |
| 111 | + <TabItem value="Azure" label="Azure"> |
| 112 | + |
| 113 | + ```shell |
| 114 | + curl --insecure --request PUT --location 'https://example.com/v1/system/config/azure/account' \ |
| 115 | + --header "Authorization: $TOKEN" \ |
| 116 | + --header 'Content-Type: application/json' \ |
| 117 | + --data "$CONFIG_JSON" |
| 118 | + ``` |
| 119 | + </TabItem> |
| 120 | + <TabItem value="AWS" label="AWS"> |
| 121 | + |
| 122 | + ```shell |
| 123 | + curl --insecure --request PUT --location 'https://vertex.example.com/v1/system/config/aws/account' \ |
| 124 | + --header "Authorization: $TOKEN" \ |
| 125 | + --header 'Content-Type: application/json' \ |
| 126 | + --data "$CONFIG_JSON" |
| 127 | + ``` |
| 128 | + </TabItem> |
| 129 | + <TabItem value="GCP" label="GCP"> |
| 130 | + |
| 131 | + ```shell |
| 132 | + curl --insecure --request PUT --location 'https://vertex.example.com/v1/system/config/gcp/account' \ |
| 133 | + --header "Authorization: $TOKEN" \ |
| 134 | + --header 'Content-Type: application/json' \ |
| 135 | + --data "$CONFIG_JSON" |
| 136 | + ``` |
| 137 | + </TabItem> |
| 138 | + |
| 139 | + </Tabs> |
| 140 | + |
| 141 | + |
| 142 | +You have successfully updated the cloud provider configuration for your self-hosted {props.edition} instance. |
| 143 | + |
| 144 | + |
| 145 | +## Validate |
| 146 | + |
| 147 | +Use the following steps to validate the cloud provider configuration update. |
| 148 | + |
| 149 | +1. Open a terminal session. |
| 150 | + |
| 151 | + |
| 152 | +2. Log in to the {props.edition} System API by using the `/v1/auth/syslogin` endpoint. Use the curl command below and replace the `example.com` placeholder URL with the URL of your {props.edition} instance. |
| 153 | +Ensure you replace the credentials below with your system console credentials. |
| 154 | + |
| 155 | + ```shell |
| 156 | + TOKEN=$(curl --insecure --location 'https://example.com/v1/auth/syslogin' \ |
| 157 | + --header 'Content-Type: application/json' \ |
| 158 | + --data '{ |
| 159 | + "password": "**********", |
| 160 | + "username": "**********" |
| 161 | + }') |
| 162 | + ``` |
| 163 | + |
| 164 | + The response will contain the authentication token that you will use in the next request. |
| 165 | + |
| 166 | +3. Use the `/v1/system/config/:provider/account` endpoint to get the cloud provider configuration. Select the tab for the cloud provider you want to update and issue the corresponding curl command. Replace the `example.com` placeholder URL with the URL of your {props.edition} instance. |
| 167 | + |
| 168 | + <!-- prettier-ignore --> |
| 169 | + |
| 170 | + <Tabs groupId="provider"> |
| 171 | + <TabItem value="Azure" label="Azure"> |
| 172 | + |
| 173 | + ```shell |
| 174 | + curl --insecure --request GET --location 'https://example.com/v1/system/config/azure/account' \ |
| 175 | + --header "Authorization: $TOKEN" \ |
| 176 | + --header 'Content-Type: application/json' |
| 177 | + ``` |
| 178 | + </TabItem> |
| 179 | + <TabItem value="AWS" label="AWS"> |
| 180 | + |
| 181 | + ```shell |
| 182 | + curl --insecure --request GET --location 'https://vertex.example.com/v1/system/config/aws/account' \ |
| 183 | + --header "Authorization: $TOKEN" \ |
| 184 | + --header 'Content-Type: application/json' |
| 185 | + ``` |
| 186 | + </TabItem> |
| 187 | + <TabItem value="GCP" label="GCP"> |
| 188 | + |
| 189 | + ```shell |
| 190 | + curl --insecure --request GET --location 'https://vertex.example.com/v1/system/config/gcp/account' \ |
| 191 | + --header "Authorization: $TOKEN" \ |
| 192 | + --header 'Content-Type: application/json' |
| 193 | + ``` |
| 194 | + </TabItem> |
| 195 | + |
| 196 | + </Tabs> |
| 197 | + |
| 198 | +4. The response will contain the cloud provider configuration details. Verify that the configuration values match the values you provided in the payload. |
0 commit comments