cancel
Showing results for 
Search instead for 
Did you mean: 
Disclaimer
JUMPCLOUD EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES, CONDITIONS, AND LIABILITIES OF ANY KIND ARISING FROM OR RELATED TO THIRD-PARTY SOFTWARE, SCRIPTS, REPOSITORIES, AND APIS. JUMPCLOUD IS NOT REQUIRED TO SUPPORT ANY SUCH THIRD-PARTY MATERIALS AND ALL RISKS RELATED TO THIRD-PARTY MATERIALS ARE YOUR RESPONSIBILITY. PLEASE ALSO REVIEW THE JUMPCLOUD TOS.

[Python] SSSIP - Self Service Software Installation Portal v1 & Hosting on AWS Lightsail using a docker image

JuergenKlaassen
Rising Star III
Rising Star III

Hi Community Folks

I got rid of some ugly 🐛's and decided to call it a v1 by now. (previous article about the RC1)
Also made it available as a docker image for easy hosting. For myself I'm using AWS Lightsail in the same way as for the GPT Assistant - read more here with some instructions.

To host it smoothly on AWS Lightsail and not being forced to change the image itself too often, I've moved the configuration for the whitelisted apps to a public URL (there's no sensitive stuff inside). You can host this config file basically everywhere, in my case it's on a S3 Bucket, but it can also be on your github or so. 

Below the table for all required env-variables you will need on AWS Lightsail:

Key Value
JUMPCLOUD_BASE_URL https://console.jumpcloud.com/api/v2/
OIDC_ISSUER https://oauth.id.jumpcloud.com/
OIDC_USERINFO_URI https://oauth.id.jumpcloud.com/userinfo
SECRET_KEY YOUR SECRET KEY
JUMP_CLOUD_API_KEY YOUR JC API KEY
OIDC_ID_TOKEN_COOKIE_SECURE True
DEBUG True
OIDC_CLIENT_SECRET YOUR OIDC CLIENT SECRET
SERVICE_CON  service://localhost
OIDC_REDIRECT_URIS https://YOUR_URL/oidc-callback
OIDC_TOKEN_URI https://oauth.id.jumpcloud.com/oauth2/token
OIDC_AUTH_URI https://oauth.id.jumpcloud.com/oauth2/auth
OIDC_COOKIE_SECURE
True
OIDC_CLIENT_ID
YOUR ODIC CLIENT ID
WHITELISTED_APPS_URL
https://YOUR_URL/whitelisted_apps.json
OIDC_CLIENT_AUTH_METHODS
client_secret_post
OIDC_OPENID_REALM
YOUR REALM

...which looks like this on your AWS Lightsail configuration:
SCR-20231201-ivwn.png

 

How do I get the docker Image into AWS Lightsail? 

First I recommend to read this:
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-container-services

Then follow the steps below:

SCR-20231201-iwzy.png

In my case for example it's actually two commands on the CLI only:

docker buildx build --platform linux/amd64 -t jcsssipflasklightsail:latest . --load --no-cache 

and

aws lightsail push-container-image --region ap-southeast-1 --service-name flask-sssip --label jcsssipflasklightsail --image jcsssipflasklightsail:latest

Once done you will have your image for deployment available here:

SCR-20231201-iyer.png

You can find a new repo with this v1 including the docker image (under packages) here.

Thanks for reading as always
-Juergen 

0 REPLIES 0