Requirements

Up and Running

Assume you've just cloned this https://gitlab.com/eAuction/devops-stuff/onpremise repository, then the following steps will get you up and running in no time.

To accommodate your needs or your environment, there may need to be modifications to the included docker-compose.yml file. These instructions are a guideline for what you should generally do.

Local setup

  1. Create Twilio Phone Verification project and put API tokens into the .env file (optional - only if you want to enable notifications on the registration)

  2. Create Mailgun Email domain and put API token in .env (optional - only if you want to enable notifications on the registration)

  3. Create Fixer.io Account and put API token in .env

  4. Login in our Docker Registry with your gitlab.com credentials.

     docker login registry.gitlab.com
    
  5. Create env config file and fill the variables.

     cp -n .env.example .env
    
  6. Create S3 bucket for the storage service on AWS and create IAM user with this policy -

       {
         "Version": "2012-10-17",
         "Statement": [
             {
                 "Sid": "VisualEditor0",
                 "Effect": "Allow",
                 "Action": "s3:ListBucket",
                 "Resource": [
                     "arn:aws:s3:::$BUCKET_NAME"
                 ]
             },
             {
                 "Sid": "VisualEditor1",
                 "Effect": "Allow",
                 "Action": "s3:ListAllMyBuckets",
                 "Resource": "*"
             },
             {
                 "Sid": "VisualEditor2",
                 "Effect": "Allow",
                 "Action": [
                     "s3:PutObject",
                     "s3:GetObject",
                     "s3:DeleteObject",
                     "s3:PutObjectAcl"
                 ],
                 "Resource": [
                     "arn:aws:s3:::$BUCKET_NAME/*"
                 ]
             }
         ]
     }
    

    fill variables in .env - AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, STORAGE_BUCKET.

  7. Generate node secret and id, add secret to .env as NODE_SEED_SECRET.

     docker-compose run --rm --no-deps --entrypoint /stellar-core core --genseed
    
  8. Generate master secret and id, add it to .env as MASTER_SECRET and MASTER_ID.

     docker-compose run --rm --no-deps --entrypoint /stellar-core core --genseed
    
  9. Generate platform secret and id, add it to .env as PLATFORM_SECRET and PLATFORM_ID.

     docker-compose run --rm --no-deps --entrypoint /stellar-core core --genseed
    
  10. Build and tag the Docker services.

     docker-compose build
    
  11. Lift all services (detached/background mode).

     docker-compose up -d
    
  12. Create platform.

     docker-compose exec horizon /platform-init
    
  13. Access api-gateway at http://127.0.0.1:8888

  14. Access frontend at http://127.0.0.1:7777

  15. Access admin-panel at http://127.0.0.1:9999

Variables

Parameter Description Example
AWS_ACCESS_KEY_ID AWS IAM Access Key ID string
AWS_SECRET_ACCESS_KEY AWS IAM Secret Access Key string
AWS_DEFAULT_REGION AWS S3 Bucket Region us-east-2
STORAGE_BUCKET Storage Service S3 Bucket Name storage-bucket
NODE_SEED_SECRET Generated Seed Secret For Core Config File string
MASTER_SECRET Generated Seed Secret For Core Master Account string
MASTER_ID Generated Seed ID For Core Master Account string
PLATFORM_SECRET Generated Seed Secret For Horizon Platforms string
PLATFORM_ID Generated Seed ID For Horizon Platforms string
NETWORK_PASSPHRASE Core Network Passphrase Test Network ; March 2019
HISTORY_BACKEND_AWS Enable Or Disable AWS S3 Backend For Core History boolean - true/false
HISTORY_BUCKET_NAME AWS S3 Bucket Name For Core History core-hist-bucket
WEB_HOST Frontend Address (supporting IP:PORT addresses) web.test.network
ADMIN_HOST Admin-panel Address (supporting IP:PORT addresses) admin.test.network
API_HOST Api-gateway Address (supporting IP:PORT addresses) api.test.network
PLATFORM_EMAIL Email For Platform Account platform@test.network
ADMIN_EMAIL Email For Admin Account admin@test.network
ADMIN_FIRSTNAME Admin First Name string
ADMIN_LASTNAME Admin Last Name string
ADMIN_PHONE Admin Phone Number +380228822884
ADMIN_PASSWORD Admin Account Password string
SENDER_NAME Notification Sender Name (will be shown in notifications FROM field, max 11 symbols) string
SENDER_DOMAIN Mail Domain In Mailgun string
CONVERTER_API_TOKEN Fixer.io API Token string
MAILGUN_KEY Mailgun API Key string
TWILIO_SID Tilio API Sid string
TWILIO_TOKEN Tilio API Token string
CORS_ORIGINS CORS Allowed Origins To Access API-getway (optional) https://google.com,http://facebook.com
NOTIFICATION_TEMPLATE Notification Template cardeal
NEW_CORE_HIST Init Core History boolean - true/false
NEW_CORE_DB Init Core Database boolean - true/false

results matching ""

    No results matching ""