Installation on AWS

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]
2 Likes

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

2 Likes

Thanks @sam,

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

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

2 Likes

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

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.

3 Likes

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

@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

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

1 Like

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

Can this be of some help for you?

1 Like

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

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.

1 Like

@itsbhanusharma can you share your app.yml file?

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

1 Like