Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Sync code from release instead of git repo (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
carise committed Mar 8, 2017
1 parent f40441a commit 2fba3ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion deployment-templates/deploy-forseti.yaml.sample
Expand Up @@ -44,6 +44,7 @@ resources:
- name: forseti-instance
type: forseti-instance.py
properties:
forseti-version: "1.0"
image-project: ubuntu-os-cloud
image-family: ubuntu-1404-lts
instance-type: f1-micro
Expand All @@ -54,7 +55,7 @@ resources:
scanner-bucket: SCANNER_BUCKET
database-name: forseti_security
organization-id: YOUR_ORG_ID
src-path: https://github.com/GoogleCloudPlatform/forseti-security
src-path: https://github.com/GoogleCloudPlatform/forseti-security/archive/v1.0.tar.gz
cloudsqlproxy-os-arch: linux.amd64
db-port: 3306
sendgrid-api-key: YOUR_SENDGRID_API_KEY
Expand Down
8 changes: 5 additions & 3 deletions deployment-templates/py/forseti-instance.py
Expand Up @@ -18,6 +18,8 @@
def GenerateConfig(context):
"""Generate configuration."""

FORSETI_SECURITY_VERSION = context.properties['forseti-version']

CLOUDSQL_CONN_STRING = '{}:{}:{}'.format(context.env['project'],
'$(ref.cloudsql-instance.region)',
'$(ref.cloudsql-instance.name)')
Expand Down Expand Up @@ -72,7 +74,6 @@ def GenerateConfig(context):
'items': [{
'key': 'startup-script',
'value': """#!/bin/bash
sudo apt-get install -y git unzip git
sudo apt-get install -y libmysqlclient-dev
sudo apt-get install -y python-pip python-dev
Expand Down Expand Up @@ -128,8 +129,8 @@ def GenerateConfig(context):
pip install --upgrade setuptools
cd $USER_HOME
git clone {}
cd forseti-security
wget -qO- {} | tar xvz
cd forseti-security-{}
python setup.py install
# Create the startup run script
Expand Down Expand Up @@ -157,6 +158,7 @@ def GenerateConfig(context):

# download forseti src code
context.properties['src-path'],
FORSETI_SECURITY_VERSION,

# run_forseti.sh
# - forseti_inventory
Expand Down

0 comments on commit 2fba3ba

Please sign in to comment.