Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dzimine committed Apr 23, 2019
1 parent 8b90ef1 commit 952003d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions scripts/feed.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash
#
# Run this script inside Vagrant VM, as SUDO, from /vagrant/scripts directory.
# It will be feeding images for GreengrassImageClassification Lambda.

files=(../images/*.jpg)

RANDOM=$$$(date +%s)
Expand Down
19 changes: 14 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/bash

VERSION="1.8.0"
PLATFORM="x86-64"
GREENGRASS_RELEASE_URL=https://d1onfpft10uf5o.cloudfront.net/greengrass-core/downloads/${VERSION}/greengrass-linux-${PLATFORM}-${VERSION}.tar.gz

# Setup
sudo adduser --system ggc_user
sudo groupadd --system ggc_group
Expand All @@ -6,20 +12,23 @@ sudo groupadd --system ggc_group
sudo apt-get update
sudo apt-get install -y sqlite3 python2.7 binutils curl

wget -O /vagrant/downloads/root.ca.pem http://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem

# Copy greengrass binaries
sudo tar -xzf /vagrant/downloads/greengrass-ubuntu-x86-64-1.5.0.tar.gz -C /
# Download and unpack greengrass binaries
wget $GREENGRASS_RELEASE_URL
GREENGRASS_RELEASE=$(basename $GREENGRASS_RELEASE_URL)
sudo tar -xzf $GREENGRASS_RELEASE -C /
rm $GREENGRASS_RELEASE

# Install ML inference dependencies (MXNet)
sudo apt-get install -y python-pip python-dev gcc
sudo pip install mxnet
sudo apt-get install -y python-opencv

# Get root certificate
wget -O /vagrant/certs/root.ca.pem http://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem

# Copy certificates and configurations
sudo cp /vagrant/certs/* /greengrass/certs
sudo cp /vagrant/config/* /greengrass/config
sudo cp /vagrant/downloads/root.ca.pem /greengrass/certs

# Create a source for images to map into the Lambda space later
sudo mkdir /images
Expand Down
2 changes: 2 additions & 0 deletions scripts/update_ggc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

echo "Reseting Greengrass Core for a new group."

echo "Copy certificates..."
Expand Down

0 comments on commit 952003d

Please sign in to comment.