Skip to content

Commit

Permalink
Update example user_data.sh (closes #148)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed May 21, 2018
1 parent 0998646 commit c552f65
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions utils/scripts/user_data.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/bin/bash

# NOTE: Use `uuidgen` to create new `uid`
iglu_server_super_uid="980ae3ab-3aba-4ffe-a3c2-3b2e24e2ffce"
set -e -x

domain_name=example.com

username=USERNAME_PLACEHOLDER
password=PASSWORD_PLACEHOLDER
username='username'
password='password'
iglu_server_super_uid='deadbeef-dead-beef-dead-beefdeadbeef'

# DO NOT ALTER BELOW #
sudo service snowplow_mini_control_plane_api start
sleep 2
sudo service iglu_server_0.3.0 restart
sudo service snowplow_mini_control_plane_api restart

#add apiKey to iglu-resolver.json for auth in the iglu server
curl -XPOST -d "iglu_server_super_uuid=$iglu_server_super_uid" localhost:10000/local-iglu
sleep 10

#add domain name to Caddyfile
# Add domain name to Caddyfile
curl -XPOST -d "domain_name=$domain_name" localhost:10000/domain-name

#add username and password to Caddyfile for basic auth
# Add username and password to Caddyfile for basic auth
curl -XPOST -d "new_username=$username&new_password=$password" localhost:10000/credentials

# Add apiKey to iglu-resolver.json for auth in the iglu server
curl -XPOST -d "local_iglu_apikey=$iglu_server_super_uid" localhost:10000/local-iglu-apikey

0 comments on commit c552f65

Please sign in to comment.