This example deploys a complete stack which automates the launch of Nimble Studio streaming sessions on behalf of users.
- The AWS CDK is used for infrastructure-as-code and deployment.
- Streaming sessions will be launched for users within an AWS Nimble Studio
This project requires that you have already have an AWS Nimble Studio created. The studio should have users and launch profiles active. Sessions for users and associated launch profiles will be configured to be launched automatically through deployment of this project.
- Install git
- Install Python
- An AWS account
- AWS CLI
- AWS CLI configured
- AWS CDK
First, clone the repository to a local working directory:
git clone https://github.com/aws-samples/nimblestudio-auto-workstation-scheduler.git
Navigate into the project directory:
cd nimblestudio-auto-workstation-scheduler
This project is set up like a standard Python project. The initialization
process also creates a virtualenv within this project, stored under the .venv
directory. To create the virtualenv it assumes that there is a python3
(or python
for Windows) executable in your path with access to the venv
package. If for any reason the automatic creation of the virtualenv fails,
you can create the virtualenv manually.
To manually create a virtualenv on MacOS and Linux:
$ python3 -m venv .venv
After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv.
$ source .venv/bin/activate
If you are a Windows platform, you would activate the virtualenv like this:
% .venv\Scripts\activate.bat
Once the virtualenv is activated, you can install the required dependencies.
$ pip install -r requirements.txt
All deployment commands must be executed inside the nimblestudio-auto-workstation-scheduler folder, navigate there if you haven't already done so.
cd nimblestudio-auto-workstation-scheduler
Set the environment variables for the app: CDK_DEFAULT_ACCOUNT
, CDK_DEFAULT_REGION
.
Example:
CDK_DEFAULT_ACCOUNT=123456789012
CDK_DEFAULT_REGION=us-west-2
This sample uses features of the AWS CDK that require you to Bootstrap your environment (a combination of an AWS account and region). The sample is configured to use us-west-2 (Oregon), so you will just need to replace the placeholder in the below command with your AWS account number.
cdk bootstrap aws://ACCOUNT-NUMBER-1/us-west-2
- Deploy the project using the following command in the root of the NimbleStudioAutomatedWorkstation folder
cdk deploy NimbleStudioAutoWorkstationSchedulerStack
To update the Automated Workstation Launch Configuration, see the README located at scripts/README.md
and utilize the included helper scripts.
The Nimble Studio Automated Workstation Scheduler will attempt to launch sessions for studio users based on configuration.
Specific configuration can be disabled for users, which will prevent the scheduler from attempting to launch those sessions. Additionally, the auto launcher can be entirely disabled. See the README located at scripts/README.md
for details on how to disable the scheduler or specific config.
It is recommended to disable the Nimble Studio Automated Workstation Scheduler before executing any Studio updates with Studio Builder.
To add additional dependencies, for example other CDK libraries, just add
them to your setup.py
file and rerun the pip install -r requirements.txt
command.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
- pynamodb: The MIT License (MIT)