Code Monkey home page Code Monkey logo

kenaco / aws-greengrass-gdk-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-greengrass/aws-greengrass-gdk-cli

0.0 0.0 0.0 534 KB

The Greengrass Development Kit - Command Line Interface (GDK CLI) is a tool that helps you create Greengrass V2 components either using templates or community repositories.

Home Page: https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-development-kit-cli.html

License: Apache License 2.0

Python 96.95% Makefile 0.07% Gherkin 2.97%

aws-greengrass-gdk-cli's Introduction

Greengrass Development Kit - Command Line Interface

CI codecov

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

The AWS IoT Greengrass Development Kit Command-Line Interface (GDK CLI) provides features that help you develop custom Greengrass components. You can use the GDK CLI to create, build, and publish custom components. When you create a component repository with the GDK CLI, you can start from a template or a community component from the Greengrass Software Catalog.

Please follow the GDK CLI public documentation to learn more about the available commands and configuration that GDK CLI has to offer.




Getting Started

Prerequisites

  1. Python3 and pip: As the GDK CLI tool is written in python, you need to have python3 and pip installed. The most recent version of python includes pip.

  2. AWS CLI: As you'd have to configure your AWS credentials using AWS CLI before running certain gdk commands.

1. Installing CLI

To install the latest version of CLI using this git repository and pip, run the following command

pip3 install git+https://github.com/aws-greengrass/[email protected]

Run gdk --help to check if the cli tool is successfully installed.

2. Configure AWS credentials

Configure AWS CLI with your credentials as shown here - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html.

3. Quick start wih HelloWorld component written in python

Note: Following steps are focused as a quick start guide. For more detailed steps, refer our documentation.

  1. Initializes new project with a HelloWorld Greengrassv2 component.

gdk component init --template HelloWorld --language python -n HelloWorld

  1. Change directory to HelloWorld.

cd HelloWorld

  1. Update configuration in gdk-config.json

    1. Config file gdk-config.json would have placeholders:
     {
         "component": {
             "com.example.PythonHelloWorld": {
                 "author": "<PLACEHOLDER_AUTHOR>",
                 "version": "NEXT_PATCH",
                 "build": {
                     "build_system": "zip"
                 },
                 "publish": {
                     "bucket": "<PLACEHOLDER_BUCKET>",
                     "region": "<PLACEHOLDER_REGION>"
                 }
             }
         },
         "gdk_version": "1.0.0"
     }
    1. Replace <PLACEHOLDER_AUTHOR> with your name, <PLACEHOLDER_BUCKET> with a prefix for an Amazon S3 bucket name and <PLACEHOLDER_REGION> with an AWS region. The specified bucket will be created in the specified region if it doesn't exist (name format: {PLACEHOLDER_BUCKET}-{PLACEHOLDER_REGION}-{account_number}).
    2. After replace these value the gdk-config.json file should look similar to:
     {
         "component": {
             "com.example.PythonHelloWorld": {
                 "author": "J. Doe",
                 "version": "NEXT_PATCH",
                 "build": {
                     "build_system": "zip"
                 },
                 "publish": {
                     "bucket": "my-s3-bucket",
                     "region": "us-east-1"
                 }
             }
         },
         "gdk_version": "1.0.0"
     }
  2. Build the artifacts and recipes of the component.

gdk component build

  1. Creates new version of the component in your AWS account.

gdk component publish




Running Tests


  • Unit tests: make tests_unit
  • Integration tests: make tests_integration

aws-greengrass-gdk-cli's People

Contributors

amazon-auto avatar dependabot[bot] avatar devnaruka avatar jacksonzhang34 avatar justinkuskowski avatar mikedombo avatar pallavi03 avatar patrzhan avatar pelder-lumenix avatar saranyailla avatar timmattison avatar uhinze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.