Update README.md

This commit is contained in:
dmjacks
2021-06-08 09:01:43 -07:00
committed by GitHub
parent f669464448
commit 09072b0dd3

View File

@@ -5,7 +5,7 @@ This document will describe how to deploy the 1Password SCIM bridge using Digita
Deploying the SCIM bridge with App Platform comes with a few benefits:
* App Platform will provide and host the URL for your SCIM bridge; you will not need to setup an A record or prepare a name for a URL as noted in [PREPARATION.md](https://github.com/1Password/scim-examples/blob/master/PREPARATION.md)
* App Platfom will host the SCIM application for a low cost of $5/mo. An additional $5/mo or $6/mo will be utilized for the Droplet created for the Redis container.
* App Platfom will host the SCIM application for a low cost of $5/mo. An additional $5/mo or $6/mo will be utilized for the Droplet created for the Redis container. *If you will be using a managed redis database, an additional $15/mo will be charged.*
* There's no need to manage the container that the SCIM bridge will be running on.
@@ -21,7 +21,7 @@ To get started with deploying the SCIM bridge using App Platform, you'll need:
Before you deploy the SCIM bridge application using App Platform, a redis database must be created first, so that you can add the connection details for your database to the application at setup. There are two options for setting up a redis database: creating a Droplet in DigitalOcean and installing redis onto it or using DigitalOcean's Managed Redis database solution.
To create a Droplet:
#### To create a Droplet:
* Under Manage in the left-hand navigation menu, select Droplet or select the Create dropdown menu in the top right corner of your DigitalOcean tenant and select Droplet.
* Choose an image for your container.
@@ -37,7 +37,7 @@ Once the creation process of your Droplet is complete:
* At this point, you will want to install redis on your Droplet. DigitalOcean provides detailed documentaion on how to install redis on each of its provided images. Documentation can be found [here](https://www.digitalocean.com/community/tutorial_collections/how-to-install-and-secure-redis)
* For the ```Binding to Localhost``` step in the redis documentation, you will want to ensure that you allow all connections initially, so that the SCIM application can make a connection to your Droplet. After the successful deployment of your SCIM application, you can lock down access to your redis Droplet, ensuring that your SCIM application only has access to that Droplet.
If you prefer to use DigitalOcean's Managed Redis Database solution:
#### If you prefer to use DigitalOcean's Managed Redis Database solution:
* Under Manage in the left-hand navigation menu, select ```Databases``` or select the Create dropdown menu in the top right corner of your DigitalOcean tenant and select Databases.
* Choose Redis as your Database Engine.
@@ -55,7 +55,11 @@ Once the creation process of your managed database is complete:
### Step Two: Building and Deploying using App Platform
Now that a redis Droplet has been created, you can start the deployment process of the SCIM application.
Now that a redis Droplet has been created, you can start the deployment process of the SCIM application. Be sure that you have forked this repo before continuing:
#### Setting up the forked repo:
* Under Manage in the left-hand navigation menu, select Apps or select the Create dropdown menu in the top right corner of your DigitalOcean tenant and select Apps.
* Select Launch Your App on the splash page. If you've already started using Apps, select Create App in the top right corner of the page.
@@ -64,21 +68,37 @@ Now that a redis Droplet has been created, you can start the deployment process
* Choose the corresponding branch.
* You can choose to allow or deny Autodeploy code changes.
* Click ```Next```.
* To configure your app, you will want to set two environment variables: ```OP_REDIS_URL``` and ```OP_SESSION```.
***NOTE**: DigitalOcean will notify you that it cannot find an app in the repo. This is due to the fact that App Platform expects the Dockerfile to be located at the root of the repo. In this case, the Dockerfile is located in the ```digitalocean-app-platform``` directory and we need to specify that source directory in App Platform.*
* Add ```digitalocean-app-platform``` after the ```/``` in the Source Directory field and select ```Find Directory```
#### App Configuration:
* To configure your app, you will need to set two environment variables: ```OP_REDIS_URL``` and ```OP_SESSION```.
* If you are using a Droplet, ```OP_REDIS_URL``` should contain the following: redis://[ip or hostname of redis Droplet]:6379
* If you are using DigitalOcean's managed database solution, ```OP_REDIS_URL``` should contain the following: redis://[ip or hostname of redis Droplet]:[provided port number]
* ```OP_SESSION``` should contain the base64 encoded version of your scimsession file. Run the following command to generate the scimsession: cat /path/to/scimsession| base64 | tr -d "\n"
* You've successfully run the command when the base64 encoded version of your scimsession is returned in the terminal. Copy and paste the contents and paste them as the value of the OP_SESSION variable. (Do not copy the % sign at the end of the contents)
* Set the HTTP port for the app to 3002.
* ```OP_SESSION``` should contain the base64 encoded version of your scimsession file. Run the following command in a terminal to generate the scimsession in a base64 encoded format: ```cat /path/to/scimsession| base64 | tr -d "\n"```
* The base64 encoded version of your scimsession should be returned in the terminal. Copy and paste the contents and paste them as the value of the OP_SESSION variable. (Do not copy the ```%``` sign at the end of the contents.)
* Set the HTTP port for the app to ```3002```.
* Click ```Next```.
* Name your application.
* Select a region for the application/container.
* Click ```Next```.
* The Basic tier of the App Platform is suffient enough for the SCIM bridge.
#### Selecting Your Tier & Deployment:
* The Basic tier of App Platform is suffient enough for the SCIM bridge.
* Under Containers, the ```Basic Size``` is defaulted to the ```1 GB RAM | 1 vCPU``` option, however the ```512 MB RAM | 1 vCPU``` option is sufficient for this deployment.
* ```Number of Containers``` should be set to 1.
* Select ```Launch Basic App```.
* The App will begin the build and deploy process. Once complete, you should receive an alert that states ```Deployed Successfully``` and the URL for the SCIM bridge will be made available on the Apps Dashboard. (You may need to refresh your page if the URL is not yet visible at this point)
* The App will begin the build and deploy process. Once complete, you should receive an alert that states ```Deployed Successfully``` and the URL for the SCIM bridge will be made available on the ```Apps Dashboard```. (You may need to refresh your page if the URL is not yet visible at this point)
* Click the URL link and enter the bearer token for your SCIM bridge to start Provisioning tasks.
* Ensure that you add the provided URL and the bearer token to your IdP of choice.
* Ensure that you add the provided URL and the bearer token to your IdP.