Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 4.36 KB

File metadata and controls

95 lines (68 loc) · 4.36 KB

AWS Autonomous Driving Datalake: Rosbag visualization using RVIZ on EC2

Simple bootstrapper project to

  1. Deploy EC2 Instance
  2. Install Ubuntu Desktop + TigerVNC
  3. Install RViz + Ros tooling
  4. Download and setup Ford AV Data

Architecture

architecture

Project Structure

├── Config
├── README.md # Helper file with instructions on how to use the app
├── bootstrap.js # Bootstrapping script to help you configure your app settings
├── cdk.json # CDK configuration file, includes settings created by bootstrap.js
├── index.ts # CDK app and stack file
├── ssm.sh # Shell script to start SSM Port forwarding session to your machine
└── user-data
    └── rviz-setup.sh # Script executed on EC2 first boot. Sets up VNC + RVIZ

Prerequisites

  • Nodejs

Bootstrap (run first time)

  1. npm install
  2. npm run project-bootstrap // Configures cdk.json context and creates SSM Parameters

Deploying and Running

  1. Ensure you've run the bootstrapping scripts above and check your values in cdk.json
  2. $ npm run cdk deploy"
  3. Wait for the bootstrapping to finish. This can take up to 15 minutes. To see the progress:
    • SSH into the machine: $ ./ssm.sh ssh (If you encounter "is not connected error see below")
    • Switch to ubuntu user: $ sudo su ubuntu
    • Tail the log and wait for user-data script to finish: $ tail -f /var/log/cloud-init-output.log
  4. Run port forwarding to connect via VNC
    • $ ./ssm.sh vnc
  5. Use your VNC client to connect to vnc://localhost:5901 using the password set during bootstrpping.

Troubleshooting:

SSM TargetNotConnected Error

Follow the troubleshooting guide here for this specific error

In some cases, an outdated version of SSM could be the cause. To update SSM on the instance you can use the following guide SSM Run Command Guide

Run RVIZ with Ford Demo Data

  1. On the VNC session GUI open a new terminal
  2. cd ~/catkin_ws
  3. Run ./0-run-all.sh to launch the demo

Resources

CDK Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Security

See CONTRIBUTING for more information.

SSM Parameter Store SecureStrings vs. Secrets Manager

This project uses SSM Parameter Store Secure Strings to store the VNC password which is read only once when executing the user-data bootstrap script.

SecureString parameter values are encrypted using KMS. For more information see the following guide on how AWS Systems Manager Parameter Store uses AWS KMS.

Since we do not require advanced features provided by AWS Secrets Manager such as password generation, rotation or cross account access, SecureString parameters are sufficient.

License

This library is licensed under the MIT-0 License. See the LICENSE file.