Step 5 - Provision the SDK¶
In this step we will provision the SDK under the client's domain.
- All the below operations are to be performed under the terraform organization created in the step 2.
- Setting up the workspace
- Create a workspace with name
sdk
prefixed with the organization's environment type. For e.g. if env isprod
then the workspace name will beprod-sdk
. - Choose
/sdk
in theterraform
github repository for version control with default branch pointing tomaster
. - Configure the following variables for the workspace
sdk_domains
- (HCL) client's domain where SDK is hosted. Replace<domain>
with the client's domain.
- Create a workspace with name
- Attach this workspace to the respective variable set of the organization created in Step 2.
-
Run the pipeline by Actions.
- Click on
Actions
and thenStart new run
to start a new run. - Below variables are present in the output
loadbalancer
- loadbalancer for client's domainsdk_domains_mapping
- DNS authentication to SDK domains. For e.g.
- Click on
-
The above pipeline creates a SSL/TLS certificate under the client's domain. This certificate needs to be verified via the DNS strategy.
- Client needs to create a CNAME record with the above
record_name
andrecord_value
as name and target respectively. - Proxy status for the CNAME record should be kept off.
- Create another CNAME record for client's domain, where the name is
endpoint
and target isloadbalancer
. This step points the client's domain to the application deployed under the loadbalancer pointed byloadbalancer
- Client needs to create a CNAME record with the above
- Edit
dns_map_ack_success
key insdk_domains
variable totrue
once the DNS records are in place. - Click on
Actions
and thenStart new run
to start a new run. - To verify the changes, hit the
/sdk/v1/geo/city
endpoint over client's domain<domain>
. This will give your geo location.