Guide: Getting Discourse Installed on OVH Cloud (Part 2)

AI-generated summary

User pl3bs shares a continuation guide for installing Discourse on OVH Cloud, assuming a clean Ubuntu 14.04 LTS setup. The process involves updating the system, switching to a generic kernel for AUFS support, and removing bind9 on cloud instances to configure DNS resolution manually. For servers hosting multiple sites, the guide recommends installing Nginx as a reverse proxy, modifying the app.yml configuration to change the container port to 4578, and adjusting the Nginx config accordingly. The author notes that a 2GB RAM OVH Cloud package is sufficient for Discourse and other services.

The guide includes a crucial warning regarding virtualization types: OpenVZ (partial virtualization) is incompatible with Discourse due to kernel limitations (specifically the lack of AUFS support on older kernels), whereas ESXI/KVM (full virtualization) is required. dbm reports an error where the linux-image-server package cannot be located, even after updating, and notes difficulties contacting OVH support. pl3bs clarifies that the guide is specific to Ubuntu 14.04 LTS and advises patience with support tickets. Additionally, lasercar encounters an error stating that the file /etc/grub.d/06_OVHkernel does not exist, indicating potential discrepancies in their environment.

As promised, I am going to post up a guide for others to follow after spending numerous hours trying to get this figured out properly. This is a continuation from here:

Where I was totally lost.

This guide assumes:

  • OVH Cloud or Dedicated Server
  • Clean install Ubuntu 14.04LTS 64bit
  • A Record Pointing (sub)Domain for Discourse to IP

apt-get update
reboot

It’s my first step at new installs. Now we’re going to switch to generic kernel for AUFS support.

apt-get install linux-image-server
mv /etc/grub.d/06_OVHkernel /etc/grub.d/25_OVHkernel
update-grub
reboot

This will install the kernel, AUFS, and update grub so that it loads after the reboot.
If you’re running a dedicated, bind9 should continue to work. Skip these next steps. If you’re in the cloud, bind9 will be broken. No need for a broken service installed on the rig. You will also need to rig DNS resolution. The following two lines will make it so for this instance, and after reboots.

apt-get remove bind9
echo “nameserver 8.8.8.8” | sudo tee /etc/resolv.conf > /dev/null
echo “nameserver 8.8.8.8” | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

I suggest another update at this point. This will verify name resolution is a success, if nothing else.

apt-get update

At this point, you will either go directly to following standard Digital Ocean Guide: https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md

For Discourse only server and be done,

Else will need more setup to host Nginx/Apache sites as well.

If the latter:

apt-get install nginx
nano /etc/nginx/sites-enabled/discourse.conf

Place this config in file, taken from this link:

Modify the domain name towards your A record made for discourse.

service nginx restart

Now you can continue with the:
https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md
However when you are modifying app.yml file, be sure to change the port for the container from - 80:80 to 4578:80. This is the only difference in the guide to follow.

You should now have your instance of discourse behind the ngnix reverse proxy. From here, you can either work with nginx directly to create more sites, else configure apache2 behind the reverse proxy. I have now had success with both.

An OVH Cloud 1 package with 2GB ram is enough to run discourse and several other sites, though I don’t have the members yet to confirm up to what size. The good thing about the OVH “cloud” (ESXI) is that you can upgrade your package if need be with a single-click from the OVH manager.

I set app.yml to 384MB and 3 unicorn workers which leads 500-800MB ram left for other services/sites to be run.

caution

Not all VPS are created equal. OpenVZ is considered partial virtualization. You need something like ESXI/KVM for full virtualization. What this ends up meaning relevant to this thread is with OpenVZ you are limited to the kernel version of the host. I have tested servermania, and ovh classic, both are stuck with 2.6 kernels, which will not work for discourse which needs AUFS. You could possibly get lucky with OpenVZ and find a new host with late kernel, but why risk it?


I dont know why, but for some reason this command is not working for me.

root@vps136068:~# apt-get install linux-image-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-server
root@vps136068:~#

because you’re on a fresh copy. apt-get update. it was the first command in the guide.

Ign https://get.docker.com docker/main Translation-en
Fetched 934 kB in 16s (56.7 kB/s)
Reading package lists... Done
root@vps136068:~# apt-get install linux-image-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-server
root@vps136068:~#

After update, i’ve followed every single step and stuck on this one. (Also i cant reinstalll VPS since OVH hosting is still in maintenace.. for no reason or telling anything) – cannot call support, i’m not from france :\

My guide is applicable to 14.04LTS on OVH Cloud. If you’re trying on 14.10 you’re probably wasting time. Each time you write a msg to tech support from the manager you will reset the cue. I had to learn that the hard way a while back. If you’re patient they should respond within two hours. That has been my experience.

I’m stuck at this step, I get:
mv: cannot stat ‘/etc/grub.d/06_OVHkernel’: No such file or directory