Giter VIP home page Giter VIP logo

greengo's People

Contributors

dzimine avatar genunity avatar mmobarak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

greengo's Issues

rootCA

any chance of adding in

if not os.path.isfile(self.group['certs']['keypath']+"/root-CA.crt"):
            urllib.urlretrieve("https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem",self.group['certs']['keypath']+"/root-CA.crt")

save getting root certificate

Creating Multi Core/Devices

Hi Dimitri,
First off thanks for the time taken to write greengo, I have used it and will be happy to contribute back if I can solve my issue. You mentioned in a aws forum creating devices and then having just one core.

This means I will then still need to pull down the pythonSDK for the device and then run a script to communicate with the lambda running on the core.

My hopes was to have a lambda that has all the SDKs in it and then just deploy these lambdas to all cores in the group.

multicores

You mentioned the one group/core with multiply devices in the post of the forum, I have picked apart the greengo code and have used a brief retooling to get a device created and the keys down.
However a overview of how this works still eludes me.

Are you suggesting
cloud->system->core->device->sensor
and duplicating this. Would the device just talk with core locally and core would communicate back to the cloud. If so I would need to write code for the devices and each device would communicate to the same core locally. That would mean all the deployed product would have exactly the same keys running exactly the same core, correct? I would need to set up subscriptions for every new device back to the core?

Sorry if this is confusing i'm still coming to grips with ggc and core iot for that matter.

I guess i'm dreaming of one set of lambdas with one subscription deploying to all cores

Existing Lambdas

Hi Dmitri,
Loving you work and will be using greengo in our production devices.
What do you feel about using existing lambdas, as I deploy and manage all my lambdas with serverless, being able to use existing lambdas would be helpful something like;

ExistingLambdas:
  - name: d1Site
    aliasarn: arn:aws:lambda:<your lambda arn>
    greengrassConfig:
      MemorySize: 128000 # Kb, ask AWS why
      Timeout: 10 # Sec
      Pinned: True # Set True for long-lived functions
      Environment:
        AccessSysfs: False
        # ResourceAccessPolicies:
          # - ResourceId: 1_path_to_input
          #   Permission: 'rw'
        Variables:
           name: value
    def create_fn_defn(self):
        for l in self.group['ExistingLambdas']:
            functions = []
            functions.append({
                'Id': l['name'],
                'FunctionArn': l['aliasarn'],
                'FunctionConfiguration': l['greengrassConfig']
            })
            fd = self._gg.create_function_definition(
                Name=l['name'],
                InitialVersion={'Functions': functions}
            )
            self.state['FunctionDefinition'] = rinse(fd)
            _update_state(self.state)

            fd_ver = self._gg.get_function_definition_version(
                FunctionDefinitionId=self.state['FunctionDefinition']['Id'],
                FunctionDefinitionVersionId=self.state['FunctionDefinition']['LatestVersion'])

            self.state['FunctionDefinition']['LatestVersionDetails'] = rinse(fd_ver)
            _update_state(self.state)

This way I could run greengo create_fn_defn and I could deploy my existing lambda

Write to Dynamodb

This is a bit odd and may require me forking but worth raising anyho, what about the option to write to a dynamodb, as I keep a list of my device in a device-table for access via appsync and user mapping

something like

DynamoTable: gen-devices
       # in __init__
        self._dynamodb = s.resource('dynamodb')

        # in create
        if 'DynamoTable' in self.group:
            self._create_table_entry()

    #create table function
    def _create_table_entry(self):
        thingTable = self._dynamodb.Table(self.group['tables']['thingTable'])
        self.group['thing']['id'] = self.id
        thingTable.put_item(
            Item=self.thing
        )

Also while on odd user cases, the name for your group, anychance this could be auto generated, as we will deploy to potential thousands of devices and save adjusting the yaml everytime

something like

# in __init__
        self.state = _load_state()
        if self.state:
            self.uuid = self.state['id']
        else:
            self.uuid = str(uuid.uuid4())
        self.name = "G"+self.uuid
# in create 
        self.state['id'] = self.uuid

Just some ideas, I can fork when you finish v2 but it would be nice to keep using the original repo

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.