     hostedzone      : "koding.me"
 
   KONFIG =
-    configName                     : configName
-    environment                    : environment
+    configName                     : options.configName
+    environment                    : options.environment
     ebEnvName                      : options.ebEnvName
     runGoWatcher                   : options.runGoWatcher
-    regions                        : regions
-    region                         : region
-    hostname                       : host
-    protocol                       : protocol
-    publicPort                     : publicPort
-    publicHostname                 : publicHostname
-    version                        : version
-    awsKeys                        : awsKeys
+    regions                        : options.regions
+    region                         : options.region
+    hostname                       : options.host
+    protocol                       : options.protocol
+    publicPort                     : options.publicPort
+    publicHostname                 : options.publicHostname
+    version                        : options.version
+    projectRoot                    : options.projectRoot
+    sendEventsToSegment            : options.sendEventsToSegment
+    kiteHome                       : options.kiteHome
+
+    redis                          : credentials.redis.url
+    monitoringRedis                : credentials.redis.url
+    mongo                          : credentials.mongo
+    mq                             : credentials.rabbitmq
+    terraformer                    : credentials.terraformer
+    recurly                        : credentials.recurly
+    google                         : credentials.google
+    twitter                        : credentials.twitter
+    linkedin                       : credentials.linkedin
+    datadog                        : credentials.datadog
+    github                         : credentials.github
+    odesk                          : credentials.recurly
+    facebook                       : credentials.facebook
+    slack                          : credentials.slack
+    sneakerS3                      : credentials.sneakerS3
+    embedly                        : credentials.embedly
+    iframely                       : credentials.iframely
+    googleapiServiceAccount        : credentials.googleapiServiceAccount
+    siftScience                    : credentials.siftScience
+    tokbox                         : credentials.tokbox
+    rollbar                        : credentials.rollbar
+    jwt                            : credentials.jwt
+    papertrail                     : credentials.papertrail
+    mailgun                        : credentials.mailgun
+    helpscout                      : credentials.helpscout
+    awsKeys                        : credentials.awsKeys
+
+    paymentwebhook                 : paymentwebhook
     broker                         : broker
-    uri                            : address: customDomain.public
     tunnelserver                   : tunnelserver
-    userSitesDomain                : userSitesDomain
+    userSitesDomain                : options.userSitesDomain
     hubspotPageURL                 : hubspotPageURL
     autoConfirmAccounts            : autoConfirmAccounts
-    projectRoot                    : projectRoot
     socialapi                      : socialapi
-    mongo                          : mongo
-    kiteHome                       : kiteHome
-    redis                          : redis.url
-    monitoringRedis                : redis.url
+    githubapi                      : githubapi
+    email                          : email
+    kloud                          : kloud
+    kontrol                        : kontrol
+    gatekeeper                     : gatekeeper
+    segment                        : segment
+    disabledFeatures               : disabledFeatures
+    domains                        : domains
+    integration                    : integration
+    uri                            : address: customDomain.public
     misc                           : {claimGlobalNamesForUsers: no , debugConnectionErrors: yes}
-    githubapi                      : githubapi
-    recaptcha                      : {enabled : recaptcha.enabled  , url : "https://www.google.com/recaptcha/api/siteverify", secret : "6Ld8wwkTAAAAAJoSJ07Q_6ysjQ54q9sJwC5w4xP_" }
+    recaptcha                      : {enabled : recaptcha.enabled  , url : "https://www.google.com/recaptcha/api/siteverify", secret : credentials.recaptcha.secret }
     # TODO: average request count per hour for a user should be measured and a reasonable limit should be set
     nodejsRateLimiter              : {enabled : no, guestRules : [{ interval: 3600, limit: 5000 }], userRules : [{ interval: 3600, limit: 10000 }]} # limit: request limit per rate limit window, interval: rate limit window duration in seconds
-
-    # -- WORKER CONFIGURATION -- #
-
-    vmwatcher                      : {port          : "6400"              , awsKey    : awsKeys.vm_vmwatcher.accessKeyId     , awsSecret : awsKeys.vm_vmwatcher.secretAccessKey , kloudSecretKey : kloud.secretKey , kloudAddr : kloud.address, connectToKlient: false, debug: false, mongo: mongo, redis: redis.url, secretKey: "vmwatchersecretkey-dev" }
-    gowebserver                    : {port          : 6500}
-    gatheringestor                 : {port          : 6800}
-    webserver                      : {port          : 8080                , useCacheHeader: no                     , kitePort          : 8860}
-    authWorker                     : {login         : "#{rabbitmq.login}" , queueName : socialQueueName+'auth'     , authExchange      : "auth"                                  , authAllExchange : "authAll"                                      , port  : 9530 }
-    mq                             : mq
-    emailWorker                    : {cronInstant   : '*/10 * * * * *'    , cronDaily : '0 10 0 * * *'             , run               : no                                      , forcedRecipientEmail: email.forcedRecipientEmail         , forcedRecipientUsername: email.forcedRecipientUsername               , maxAge: 3      , port  : 9540 }
-    elasticSearch                  : {host          : "#{boot2dockerbox}" , port      : 9200                       , enabled           : no                                      , queue           : "elasticSearchFeederQueue"}
-    social                         : {port          : 3030                , login     : "#{rabbitmq.login}"        , queueName         : socialQueueName                         , kitePort        : 8760 }
-    email                          : email
-    newkites                       : {useTLS        : no                  , certFile  : ""                         , keyFile: "#{projectRoot}/kite_home/koding/kite.key"}
-    boxproxy                       : {port          : 8090 }
-    sourcemaps                     : {port          : 3526 }
-    rerouting                      : {port          : 9500 }
-    emailer                        : {port          : 9600 }
-    kloud                          : kloud
-    terraformer                    : terraformer
-    kontrol                        : kontrol
-    newkontrol                     : kontrol
-    gatekeeper                     : gatekeeper
-
-    # -- MISC SERVICES --#
-    recurly                        : {apiKey        : "4a0b7965feb841238eadf94a46ef72ee"             , loggedRequests: "/^(subscriptions|transactions)/"}
-    opsview                        : {push          : no                                             , host          : ''                                           , bin: null                                                                             , conf: null}
-    github                         : github
-    odesk                          : {key           : "7872edfe51d905c0d1bde1040dd33c1a"             , secret        : "746e22f34ca4546e"                           , request_url: "https://www.upwork.com/api/auth/v1/oauth/token/request"                  , access_url: "https://www.upwork.com/api/auth/v1/oauth/token/access" , secret_url: "https://www.upwork.com/services/api/auth?oauth_token=" , version: "1.0"                                                    , signature: "HMAC-SHA1" , redirect_uri : "#{customDomain.host}:#{customDomain.port}/-/oauth/odesk/callback"}
-    facebook                       : {clientId      : "1408510959475637"                             , clientSecret  : "bf837bc719dc63c870ac77f9c76fe26d"           , redirectUri  : "http://dev.koding.com:8090/-/oauth/facebook/callback"}
-    slack                          : slack
-    sneakerS3                      : sneakerS3
-    google                         : {client_id     : "569190240880-d40t0cmjsu1lkenbqbhn5d16uu9ai49s.apps.googleusercontent.com"                                    , client_secret : "9eqjhOUgnjOOjXxfn6bVzXz-"                                            , redirect_uri : "http://dev.koding.com:8090/-/oauth/google/callback" }
-    twitter                        : {key           : "aFVoHwffzThRszhMo2IQQ"                        , secret        : "QsTgIITMwo2yBJtpcp9sUETSHqEZ2Fh7qEQtRtOi2E" , redirect_uri : "http://dev.koding.com:8090/-/oauth/twitter/callback"                  , request_url  : "https://twitter.com/oauth/request_token"           , access_url   : "https://twitter.com/oauth/access_token"            , secret_url: "https://twitter.com/oauth/authenticate?oauth_token=" , version: "1.0"         , signature: "HMAC-SHA1"}
-    linkedin                       : {client_id     : "7523x9y261cw0v"                               , client_secret : "VBpMs6tEfs3peYwa"                           , redirect_uri : "http://dev.koding.com:8090/-/oauth/linkedin/callback"}
-    datadog                        : {api_key       : "1daadb1d4e69d1ae0006b73d404e527b"             , app_key       : "aecf805ae46ec49bdd75e8866e61e382918e2ee5"}
     sessionCookie                  : {maxAge        : 1000 * 60 * 60 * 24 * 14                       , secure        : no}
-    aws                            : {key           : ""                                             , secret        : ''}
-    embedly                        : {apiKey        : "537d6a2471864e80b91d9f4a78384873" }
-    iframely                       : {apiKey        : "157f8f72ac846689f47865"                       , url           : 'http://iframe.ly/api/oembed'}
     troubleshoot                   : {recipientEmail: "can@koding.com" }
-    rollbar                        : "71c25e4dc728431b88f82bd3e7a600c9"
-    segment                        : segment
-    googleapiServiceAccount        : googleapiServiceAccount
-    siftScience                    : '2b62c0cbea188dc6'
-    tokbox                         : tokbox
-    disabledFeatures               : disabledFeatures
     contentRotatorUrl              : 'http://koding.github.io'
-    collaboration                  : {timeout: 1 * 60 * 1000}
-    client                         : {watch: yes                                                     , version: version                                              , includesPath:'client' , indexMaster: "index-master.html" , index: "default.html" , useStaticFileServer: no , staticFilesBaseUrl: "#{customDomain.public}:#{customDomain.port}"}
-    jwt                            : {secret: "71c25e4dc728431b88f82bd3e7a600c9"                     , confirmExpiresInMinutes: 10080  } # 7 days
-    papertrail                     : {destination: 'logs3.papertrailapp.com:13734'                   , groupId: 2199093                                              , token: '4p4KML0UeU4ijb0swx' }
-    sendEventsToSegment            : options.sendEventsToSegment
-    mailgun                        : mailgun
-    helpscout                      : {apiKey: 'b041e4da61c0934cb73d47e1626098430738b049'             , baseUrl: 'https://api.helpscout.net/v1'}
-    domains                        : domains
+    collaboration                  : { timeout: 1 * 60 * 1000 }
+    client                         : { watch: yes                                                     , version: options.version                                              , includesPath:'client' , indexMaster: "index-master.html" , index: "default.html" , useStaticFileServer: no , staticFilesBaseUrl: "#{customDomain.public}:#{customDomain.port}"}
 
   #-------- runtimeOptions: PROPERTIES SHARED WITH BROWSER --------#
   # NOTE: when you add to runtime options below, be sure to modify

      function updatePermissions () {

        echo '#---> UPDATING MONGO DATABASE ACCORDING TO LATEST CHANGES IN CODE (UPDATE PERMISSIONS @gokmen) <---#'
        cd #{projectRoot}
        node #{projectRoot}/scripts/permission-updater -c dev --reset

      }

      function updateusers () {

        cd #{projectRoot}
        node #{projectRoot}/scripts/user-updater

      }

      function create_default_workspace () {

        node #{projectRoot}/scripts/create-default-workspace

      }


          exit 1
        fi

        #{GOBIN}/migrate -url "postgres://#{credentials.postgres.host}:#{credentials.postgres.port}/#{credentials.postgres.dbname}?user=social_superuser&password=social_superuser" -path "#{options.projectRoot}/go/src/socialapi/db/sql/migrations" $param $2

        if [ "$param" == "create" ]; then
          echo "Please edit created script files and add them to your repository."
