Installation on AWS

AI-generated summary

A user, Tango, is attempting to install Discourse on AWS using EC2, PostgreSQL, and Redis. They are following a guide and have added database settings to their app.yml file. sam confirms this is correct and advises against mixing in the database.yml file.

Tango asks for clarification, and sam explains that Discourse uses GlobalSettings for configuration. AbhishekVerma mentions that Discourse on AWS Marketplace is provided by Bitnami, but sam clarifies that unsupported Discourse on AWS is provided by Bitnami.

Tango notes that Bitnami’s solution doesn’t use RDS and Elasticache. Tango asks how to avoid mixing in the database.yml file, and Cameron_D suggests removing certain lines from the app.yml file.

After making changes, Tango encounters error messages during the setup process. itsbhanusharma suggests a guide that may be helpful, but Tango reports that they have already followed it. itsbhanusharma advises revisiting the guide and checking security groups for potential issues. Tango requests to see itsbhanusharma’s app.yml file, but itsbhanusharma no longer has it available.

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 http://stroupaloop.com/blog/discourse-setup-using-aws/

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]

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

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.

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.

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.

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?

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.

@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!