Installation on AWS


#1

Hi,
Complete newb here trying to get an installation happening on AWS using EC2 (Ubuntu 16.05LTS), PostgreSQL, Redis.
Im following the under 30 minute guide as well as Discourse setup using AWS | andrew stroup's Blog

I noticed in the app.yml file, there are no options to specify database. Is it just a point of adding in the following with my settings into the yml file?

Thanks in advance

Todd

  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_NAME: [AWS_POSTGRES_DB_NAME]
  DISCOURSE_DB_POOL: 15
  DISCOURSE_DB_USERNAME: [AWS_POSTGRES_DB_USERNAME]
  DISCOURSE_DB_PASSWORD: [AWS_POSTGRES_DB_PASSWORD]
  DISCOURSE_DB_HOST: [AWS_POSTGRES_ENDPOINT]
  DISCOURSE_REDIS_HOST: [AWS_REDIS_ENDPOINT]

(Sam Saffron) #2

Pretty much and then not mixing in the database.yml file cause you do now want it in the container.


#3

Thanks @sam,

Would it t be better to add in the database.yml file?


(Sam Saffron) #4

No, we use GlobalSettings which are either in discourse.conf or ENV for configuration of production.


(Discourse Fan) #5

Discourse on AWS marketplace is provided by Bitnami. You can go to their official forum and ask your questions.


(Sam Saffron) #6

Clarification: unsupported Discourse on AWS is provided by Bitnami, if you choose to go that path you must get all your support from Bitnami not meta.discourse.org.


#7

That doesn’t look like it’s using RDS & Elasticache.


#8

@sam how do you “not mix in the database.yml file”

Is it just a point of removing the following lines in the app.yml file?

  • “templates/postgres.template.yml”
  • “templates/redis.template.yml”

could you please expand

Thanks

Todd


(Cameron:D) #9

That should be it, yes. The web_only sample should be your basis for the container.


#10

After making said changes & running ./discourse setup again I am getting error messages

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 192 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
2cd1970d5dc16462b89df28ebbd6b880c5640d0b21f8f2283d3b59d8e8695a9f
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

(Bhanu Sharma) #11

Can this be of some help for you?


#12

Thanks @itsbhanusharma but this is what ive done but still getting errors


(Bhanu Sharma) #13

I’d suggest revisiting the guide point by point once, I followed the guide I linked above and it works for me without much tinkering.

However, if you still get errors, there can be (potential) issues with amazon’s security groups as well! please check them as well.


#14

@itsbhanusharma can you share your app.yml file?


(Bhanu Sharma) #15

Apologies! I don’t have it in hand, it was just a test that went well and I destroyed the node!