You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

How to Install Docker

Follow the instructions here: https://docs.docker.com/get-docker/

Acquire/Configure Credentials

  • Contact Social Media Macroscope development team to acquire current SMILE credentials Chen Wang
  • Alternatively, you can set up your own set of credentials by configuring the below shell script.


Using Traefik

# system setting
export DOCKERIZED=true

# if use AWS algorithm, then you must use a static IP address
export LOCAL_ALGORITHM=true
export HOST_IP=<your host IP address>
export HOME=<your path on host machine>
export =macroscope-smile
#set server info
export SERVER=smm.server.com
# single user version vs multiple users 
export SINGLE_USER=true

# create mounted volumes on host machine
mkdir -p ${HOME}/smile_data
mkdir -p ${HOME}/smile_data/${BUCKET_NAME}
mkdir -p ${HOME}/smile_user
mkdir -p ${HOME}/smile_tag

# email notification (To enable notification, uncomment below and put down valid email server information) 
# export EMAIL_HOST=
# export EMAIL_PORT=
# export EMAIL_FROM_ADDRESS=
# export EMAIL_PASSWORD=

# CiLogon
export CILOGON_CLIENT_ID=
export CILOGON_CLIENT_SECRET=
export CILOGON_CALLBACK_URL=
# put down your own RANDOM keys at least 8 digits;
# if wish to align with your AWS deployment, please put down AWS access key and secret (Not required if LOCAL_ALGORITHM=true) 
export AWS_ACCESSKEY=
export AWS_ACCESSKEYSECRET=

# social media platforms
export REDDIT_CLIENT_ID=
export REDDIT_CLIENT_SECRET=
export TWITTER_CONSUMER_KEY=
export TWITTER_CONSUMER_SECRET=

# export
export BOX_CLIENT_ID=
export BOX_CLIENT_SECRET=
export DROPBOX_CLIENT_ID=
export DROPBOX_CLIENT_SECRET=
export GOOGLE_CLIENT_ID=
export GOOGLE_CLIENT_SECRET=

# start
docker-compose -f docker-compose-smile.yml up

# stop
# docker-compose -f docker-compose-smile.yml down -v

Variables Explained

  • System setting. Set to true to use standalone containerized SMILE.
    • DOCKERIZED=true
  • If using algorithm deployed on AWS, then you must use a static IP address.
    • LOCAL_ALGORITHM=true
  • Single user mode vs multiple users mode.
    • SINGLE_USER=false
  • Settings for CILOGON (this section is not required if running in single user mode)
    • CILOGON_CLIENT_ID={{cilogon id}}
    • CILOGON_CLIENT_SECRET={{cilogon client secret}}
    • CILOGON_CALLBACK_URL={{ci logon callback url}}
  • Configure email server to enable capability of sending email notifications for long running jobs.
    • EMAIL_HOST={{email host}}
    • EMAIL_PORT=465
    • EMAIL_FROM_ADDRESS={{email from address}}
    • EMAIL_PASSWORD={{email password}}
  • MINIO access keys and secret. Can be set to align with AWS S3 access keys and secret.
    • AWS_ACCESSKEY={{aws_accesskey}}
    • AWS_ACCESSKEYSECRET={{aws_accesskeysecret}}
  • Social media platforms configurations.
    • REDDIT_CLIENT_ID={{reddit client id}}
    • REDDIT_CLIENT_SECRET={{reddit client secret}}
    • REDDIT_CALLBACK_URL={{reddit callback url}}
    • TWITTER_CONSUMER_KEY={{twitter consumer key}}
    • TWITTER_CONSUMER_SECRET={{twitter consumer secret}}
    • TWITTER_V2_CLIENT_ID={{twitter v2 client id}}
    • TWITTER_V2_CLIENT_SECRET={{twitter v2 client secret}}
    • TWITTER_V2_CALLBACK_URL={{twitter v2 callback url}}
  • Cloud storage platforms configurations (Optional)
    • BOX_CLIENT_ID=
    • BOX_CLIENT_SECRET={{box client secret}}
    • DROPBOX_CLIENT_ID={{dropbox client id}}
    • DROPBOX_CLIENT_SECRET={{dropbox client secret}}
    • GOOGLE_CLIENT_ID={{google client id}}
    • GOOGLE_CLIENT_SECRET={{google client secret}}
  • Clowder configurations (Optional)
    • CLOWDER_BASE_URL={{clowder instance base url}}
    • CLOWDER_GLOBAL_KEY={{clowder global key}}
    • CLOWDER_ON=false (enable connection to clowder or not)

Note:

  • You need to place your host IP address to HOST_IP variable. For example, mine IP is 192.168.10.12. If you are a mac user, you can find your IP here


  • The HOME variable will be the location to hold persistent data, such as user information, social media and analytics output, tags and etc.

  • When set SINGLE_USER=true, it uses your home user name on your machine. When set SINGLE_USER=false, you will be redirect to registration/login page.

How to Run

All images you needed to run the stack have already been pushed to Docker Hub: https://hub.docker.com/orgs/socialmediamacroscope/repositories
All you need is the YAML configuration file to run.

You must Download the docker compose YAML file

compose yaml file here:

docker-compose-smile.yml

To Start

run the prewritten shell script:

sh docker-command-smile.sh

or

export all environment variables and then

docker-compose -f docker-compose-smile.yml up

Then you should be able to access SMILE at http://<your IP address>:8001

To Stop

docker-compose -f docker-compose-smile.yml down -v

Update

docker-compose -f docker-compose-smile.yml pull


To remove Existing volume

docker volume rm {volume name. e.g.rabbitmq_smile_content_data}


Appendix:

SMILE and BAE images on Docker Hub

https://hub.docker.com/orgs/socialmediamacroscope/repositories

Architectures

Docker vs Hubzero Tool mode

export DOCKERIZED=true → Dockerized version
export DOCKERIZED=false → Hubzero Tool version, can be run by command npm start


Increase Memory and CPU allocation for Docker

Some of the analysis algorithms are very memory intensive.  Make sure you adjust memory and CPU for Docker to achieve the optimal performance.  Make sure you set values smaller than your host machine. 

  • No labels