Successfully reported this slideshow.
Your SlideShare is downloading. ×

AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - AWS re:Invent 2018

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 38 Ad

AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - AWS re:Invent 2018

Download to read offline

AWS Greengrass allows you to build edge applications fast using familiar AWS constructs. But no matter how fast we build things, we want to build them faster. In this workshop, we show how to build and deploy a Greengrass Core manually. Then we provide hands-on experience with a new open source tool that lets you iterate on your applications faster than ever. Finally, we ask for feedback on how the tool meets your needs.

AWS Greengrass allows you to build edge applications fast using familiar AWS constructs. But no matter how fast we build things, we want to build them faster. In this workshop, we show how to build and deploy a Greengrass Core manually. Then we provide hands-on experience with a new open source tool that lets you iterate on your applications faster than ever. Finally, we ask for feedback on how the tool meets your needs.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - AWS re:Invent 2018 (20)

Advertisement

More from Amazon Web Services (20)

AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - AWS re:Invent 2018

  1. 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Greengrass, Containers, and Your Dev Process for Edge Apps Tim Mattison Global Tech Lead, IoT Partners Amazon Web Services G P S W S 4 0 4 Craig Williams Principal Solutions Architect, IoT Amazon Web Services
  2. 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  3. 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Survey time • How many of you have deployed AWS Greengrass manually? • How long did the first deployment take? • How many of you wrote your own automation?
  4. 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Big goals Be comfortable deploying, developing, and debugging AWS Greengrass code Never be afraid to destroy and recreate AWS Greengrass cores
  5. 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  6. 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Detailed goals AWS Greengrass "Hello, World" running on Amazon Elastic Compute Cloud (Amazon EC2) Redeploy updated "Hello, World" AWS Greengrass with multiple AWS Lambda functions Optional: AWS Greengrass running on Docker on Amazon EC2
  7. 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  8. 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Greengrass Core
  9. 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  10. 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  11. 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  12. 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What do you care about as a developer? I have collections of Lambda functions I want to run at the edge That code • Communicates with other functions • Uses AWS services (when available) • Accesses local resources
  13. 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  14. 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  15. 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  16. 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Features (1 of 2)… • Builds Python, NodeJS, and Java Lambda functions • Uploads and creates aliases for Lambda functions • Describes the AWS Greengrass core in just a few files • Simplifies working with local resources • Has sane defaults and examples that make getting started easier • Allows you to build AWS Greengrass cores in minutes
  17. 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Features (2 of 2)… • Allows modifications of groups in place • Add/remove a device • Add/remove a function • Add/remove a subscription • Deployments will overwrite these in place changes! • Can launch AWS CloudFormation stacks for supporting infrastructure • Builds Docker images with AWS Greengrass in them
  18. 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Highest-level concepts • Deployment configuration • Function configuration
  19. 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Deployment configuration • What to deploy • A list of zero or more functions • Role and policy information
  20. 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Deployment configuration
  21. 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Function configuration • Language to use, function handler name, amount of memory, pinned or event based, timeout • Inputs - topics the function can accept messages on • Outputs - topics the function is expected to send messages on • Inputs and outputs from different functions are wired together • Cloud topics are topics that are routed to/from the cloud
  22. 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Function configuration
  23. 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. A more complex function configuration
  24. 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Additional function configuration • Local resources • Environment variables
  25. 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  26. 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Simple deployment, step 1 ./deploy.sh -g ec2 -d deployments/python-hello-world.conf -a X86_64 --script -g is the name of the group, ec2 -d is the deployment configuration file which refers to the Python Hello World function -a is the architecture, x86_64 since we're using EC2 --script generates the bootstrap script in build/gg.ec2.sh
  27. 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Simple deployment, step 2 Copy build/gg.ec2.sh to an Ubuntu EC2 instance On the EC2 instance run: ./gg.ec2.sh --now This will install the dependencies for AWS Greengrass, install AWS Greengrass itself, start AWS Greengrass, and then tail the runtime log so you can see what's going on
  28. 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  29. 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What happened (deployment)? • We built ec2-HelloWorldPython • This avoids naming conflicts between groups running the same functions • We wired ec2_Core/python/hello/world to the cloud • Subscription table set up was automatic • We created a script that can bootstrap our Amazon EC2 instance and ran it
  30. 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  31. 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Simple redeployment ./deploy.sh -g ec2 -d deployments/python-hello-world.conf -g is the name of the group, ec2 -d is the deployment configuration file which refers to the Python Hello World function No need to specify the architecture or get a script as output. The AWS Greengrass service will redeploy the code to your core.
  32. 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  33. 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What happened (redeployment)? • We built ec2-HelloWorldPython and created a new version • We created an entire new deployment • Manual changes would be blown away at this point • We let the AWS Greengrass service deploy our new code to the instance
  34. 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Notes about the labs • Any steps that have "(via console)" after them also have a corresponding step showing how to do the task with the AWS Greengrass Provisioner tool • If you get through everything, let us know! There are plenty more AWS Greengrass labs where these came from. • If you finish quickly and think this is too easy please go back and do the manual lab (lab 1A) to gain a full appreciation for the automation
  35. 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Your turn reinvent.awsworkshops.com Username: aws Password: icebreaker
  36. 36. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  37. 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

×