- Have an AWS Account
- Spin up an EC2 Instance of Ubuntu Server and Make sure that your instance's security groups allow incoming connections on TCP ports 22 and 3000
- Use an Elastic IP to bind your Instance to it --- You would not be paying for this -- Till the time the EC2 Instance is running (It's easy. Go to EC2 Dashboard, click Elastic IPs, Click add. After you add it, select it and associate it to the instance you created.)
- Add the IP Allocated to your A Record --- with your registrar
- Have a SSH Connection to your EC2 Instance with the Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html is an example way for windows)
- Connect to the EC2 Instance
1. sudo apt-get update # before starting instl --- always better to do this*
2. sudo apt-get install -y nodejs
3. sudo apt-get update
4. sudo apt-get install libmysqlclient-dev # Make sure that there are no errors
5. sudo apt-get update
6. sudo apt-get install libsqlite3-dev # for mailcatcher will not need
7. sudo apt-get update
8. sudo apt-get install libssl-dev # for some build issues I had to install this
9. sudo apt-get update
10. sudo apt-get install libffi-dev
11. sudo apt-get update
Download appropriate ruby version https://www.ruby-lang.org/en/downloads/
1. cd /tmp
2. wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz # Use the latest stable version
3. tar -xvzf ruby-2.3.1.tar.gz # Make sure that there are no errors
4. cd ruby-2.3.1/
5. sudo apt-get istall make # install make
6. sudo apt-get update
7. ./configure --prefix=/usr/local # Make sure that there are no errors
8. sudo apt-get install OpenSSL
9. sudo apt-get update
10. make # Make sure that there are no errors
11. make check *ALWAYS BETTER TO DO THIS STEP ----- to check all dependencies*.
12. sudo make install
1. sudo apt-get update
2. sudo gem update --system.
3. sudo gem install bundler -- ## UPDATE BUNDLER
sudo apt-get install git
Check this link for more details - [https://help.github.com/articles/set-up-git/#platform-linux]
1. git config --global user.name "YOUR NAME"
2. git config --global user.email "YOUR EMAIL ADDRESS"
1. sudo apt-get update
2. sudo apt-get install mysql-client-5.5 mysql-server-5.5 # check latest from apt search cmd*
# Though its better to use Amazon RDS services for better throughput and better overall efficiency in the system
1. sudo apt-get update
2. sudo apt-get install sphinxsearch
1. sudo apt-get update
2. sudo apt-get install imagemagick
git clone git://github.com/sharetribe/sharetribe.git <preferably use a stable version>
cd sharetribe
1. cp config/database.example.yml config/database.yml
2. cd config
3. vi database.yml
***Edit the pwds as reqd -- Your USERNAME AND PASSWORDS as while instl mysql*
cp config.example.yml config.yml
1. vi config.yml
2. domain: yourdomain.com:3000 # Replace yourdomain.com with your domain
Note : there must be an entry in the A Record/CNAME Record to point to
your AWS EC2 instance IP Addresses Do not work with sharetribe
1. sudo apt-get update
2. sudo apt-get install build-essential g++ # This is because of error faced in next step
3. sudo apt-get update
4. sudo gem install unf_ext -v '0.0.7.2' # This because of error faced in next step
5. sudo apt-get update
6. bundle install
1. bundle exec db:create
2. bundle exec rake db:schema:load
bundle exec rake ts:index
bundle exec rake ts:start
bundle exec rake jobs:work
bundle exec rails server -b 0.0.0.0 <to bind it on all interfaces>
1. nohup bundle exec rake jobs:work &
2. disown
3. bundle exec rails server -d -b 0.0.0.0
- Make an RDS Instance
- set the Instance to the same security group as your EC2 Instance -- critical
- update the databse.yml file with localhost to RDS Instance Endpoint
- Enjoy -- better speeds
- Make an IAM User with Appropriate S3 priviledges
- In the config file add bucket_name : xxx
- In the config file add Upload_bucket_name : yyy Note : Both the above buckets xxx,yyy should not be in your S3 bucket ; its better that Sharetribe creates it for you else it will not work --its a hack --dont know the exact reason
- In the config file add asset_host : zzz.cloudfront.com or a CNAME to the CDN
- In the config file ; Add the Created IAM User and pwd Now Edit the CORS Configs to accomodate Put Post Delete etc, And modify the Origin tags appropriately
SHARETRIBE ON UBUNTU 14.03 VM -- Coming Soon -- Just Click and Go
Will also put in a link to a UBUNTU 14.04 LTS VM -- downloadable soon .... just finding where to upload it to as i have it ready with me ...looking for hosting it ... maybe a torrent if no other option exists.
This is the first Sketchy Guide -- will update with images etc as i dont know how to put inline images presently
Comments/Review for better deployment is welcome
Will help me to understand is this required or not . Tx.