The 0.1.0 beta release is available for customers to test the newly re-architected Service Workbench solution from AWS.
This release includes:
- New user experience for workspace based on the AWS UI Design System
- Sagemaker Notebook as a compute environment (connect, start, stop, terminate)
- Data set attachment to Sagemaker Notebooks
- Research user creation
- Workspaces include search/filter/sort functions
- Customers able to add custom environments
- Improved performance on workspace page with pagination
To test the new Service Workbench on AWS v2 r0.1.0, follow the deployment instructions:
- Setup Instructions for SWBv2p1
- Adding a new environment type
Note: API based updates to the database are required for some functionalities.
Statements | Branches | Functions | Lines |
---|---|---|---|
The requirements below are for running the lambda locally
- In root directory at
solution-spark-on-aws
runrush install
- Copy
src/config/example.yaml
and create a new file in the format<STAGE>.yaml
in the config folder - Uncomment the
stage
attribute and provide the correct<STAGE>
value for the attribute - Uncomment
awsRegion
andawsRegionShortName
.aws-region
value can be one of the values on this table, under theRegion
column.awsRegionName
can be a two or three letter abbreviation for that region, of your own choosing. - Uncomment
rootUserEmail
and provide the main account user's email address - Run
chmod 777 <STAGE>.yaml
to allow local script to read the file
If you have made changes to the environment
package or the swb-reference
package follow these steps
- In
solution-spark-on-aws
root directory runrush build
- In
solution-spark-on-aws/solutions/swb-reference
root directory runSTAGE=<STAGE TO RUN LOCALLY> ./scripts/runLocally.sh
. This will run a local lambda server.
Run one time to Bootstrap the CDK
STAGE=<STAGE> rushx cdk bootstrap
Deploy/Update code
STAGE=<STAGE TO DEPLOY> rushx cdk-deploy
This step is necessary to setup Service Catalog portfolio and products
STAGE=<STAGE> rushx run-postDeployment
To run integration tests
- In
./integration-tests/config
make a copy ofexample.yaml
and name it<STAGE>.yaml
. Uncomment the attributes and provide the appropriate config value. - For
rootPasswordParamsStorePath
, go to the AWS console for your Main account, and create a parameter to store the root user password. The name of the parameter should be/swb/<STAGE>/rootUser/password
- In this root directory run
STAGE=<STAGE> rushx integration-tests
To use the framework for calling the SWBv2 API, create a ClientSession
and then use the resources
attribute to call the CRUD
commands
Example code for creating new environment
const setup: Setup = new Setup();
const adminSession = await setup.createAdminSession();
const { data: response } = await adminSession.resources.environments.create();
Example code for GET one environment
const setup: Setup = new Setup();
const adminSession = await setup.createAdminSession();
const envId='abc';
const { data: response } = await adminSession.resources.environments.environment(envId).get();
Example code for GETTING all environment with status "COMPLETED"
const setup: Setup = new Setup();
const adminSession = await setup.createAdminSession();
const { data: response } = await adminSession.resources.environments.get({status: 'COMPLETED'});
Go to solutions/swb-app
to update staticRouteConfig.ts
and staticPermissionsConfig.ts
with any necessary changes to routes/permissions.
- Create a staging file in
integration-tests/config
with these three fields filled out
#Cognito Integ Test Client
awsRegion: '<REGION>'
userPoolId: '<USER_POOL_ID>'
clientId: '<CLIENT_ID>'
- Go to
swb-reference/scripts
folder - Pull down all required dependencies by running
rushx build
- Run
STAGE=<STAGE> node generateCognitoToken.js <userName> '<password>'
with the correct value for<userName>
and<password>
. It should be a user that has been created for your SWB deployment. Note, the quotes around<password>
is necessary for the script to correctly parse passwords that have symbols in it. - In the console output, use the
accessToken
that is provided to make authenticated API requests.
- Why is there
jest.config.js
andconfig/jest.config.json
?
config/jest.config.json
is the settings for unit tests in thesrc
folderjest.config.js
is the settings for tests inintegration-tests
. These tests require setup steps that are not required by unit tests in thesrc
folder.
- When I try to run the code locally or deploy the code, I'm getting dependency errors between the local packages.
The lib
folders for your project might have been deleted. Try running rush purge; rush build
in the root
directory of this project to build the lib
folders from scratch.
- How do I see which line of code my unit tests did not cover?
Run rushx jest --coverage
- Why am I'm getting the error "Cannot find module in
common/temp
"?
Your node_modules
might have been corrupted. Try the following command
rush purge
rush install
rush build