ApplicationsLabelbox Migration

labelbox Migration Steps

Connect to instance (Now stopped after migration was finished)

ssh -i <genentech_prod_key> ubuntu@<Private IP of the instance>

Dump SQL Schema

kubectl exec -it sts/labelbox-mysql-master -- mysqldump -u $MYSQL_USER -p$MYSQL_PASSWORD --skip-dump-rows --set-gtid-purged=OFF $MYSQL_DATABASE > mysql-schema.sql

Dump mysql data

kubectl exec -it sts/labelbox-mysql-master -- mysqldump -u $MYSQL_USER -p$MYSQL_PASSWORD --no-create-info --complete-insert --replace --set-gtid-purged=OFF $MYSQL_DATABASE > mysql-data.sql

Encrypt mysql-data with password

```tar -czf - * | openssl enc -e -aes256 -out secured.tar.gz“

Upload data to s3 bucket (ai-labelbox-prod-migration-application-data) to share it with the labelbox team

aws s3 cp ./mysql-data.sql s3://ai-labelbox-prod-migration-application-data

Labelbox Integration with S3 Bucket

Open new integration in Labelbox

  • Start by logging into Labelbox and creating a new IAM Integration.
  • Log into Labelbox, go to Account > Integrations, and click New Integration. Copy the Labelbox account ID and external ID. Leave this open as you will come back to it later.

Create a role for Labelbox in AWS

Complete integration setup in Labelbox

Add the Role ARN to the new integration you opened in Labelbox in step 1.

Go back to the Integrations tab in Labelbox and paste the AWS Role ARN in the provided field. Then, name the integration.

Validate the integration

Next, you’ll need to make sure the validation was set up correctly.

If you completed Parts 1 & 3 via the Labelbox UI, Labelbox will automatically run a validation check on the integration setup for you. You can check by going to the Integrations tab and checking the Last checked column indicates whether the integration was successful. If the integration failed, click on the refresh icon to view the error messages.

Upload data

Delegated Access for AWS supports “virtual-hosted-style” URLs; they follow this format:

https://<bucket-name>.s3.<region>.amazonaws.com/<key> Upload data

Validate the dataset

Last, you will need to make sure your dataset was configured correctly.

If you created your integration and imported your dataset via the Labelbox UI, Labelbox will automatically run validation checks to determine whether the CORS setup was configured properly. It will also check whether Labelbox can successfully fetch data from your S3 bucket and if Labelbox can properly sign the URLs.

Your dataset should now be set up with IAM Delegated Access. Labelbox will use the AWS role you created to generate temporary signed URLs every time it accesses data in your S3 bucket.

Delegated Access Bucket

This is the implementation documentation of how to create labelbox integration with s3 bucket https://docs.labelbox.com/docs/import-aws-s3-data, This is where all the project images and data is found. The actual implementation is found in the terraform code mentioned below

Terraform code for the labelbox Migration

https://code.roche.com/ace/terraform-aws-prod/-/tree/master/us-west-2/labelbox-prod

Management system / DLs / points of contact