DEV Community

Cover image for Setting up environment for JHIpster
Alejandro
Alejandro

Posted on

Setting up environment for JHIpster

Photo by Maximilian Weisbecker on Unsplash
As my company approved my 2 days a week remote work, they just gave me a new (really amazing Dell Latitude) laptop with Ubuntu.

I had a lot of packages to install as it was a clean install, so I thought it would be a good idea to make a post so I don't have to search all over again every time I need to setup my box (it has happened several time before).

Docker CE

I think this doesn't need too much words.

Install the certificate

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
Enter fullscreen mode Exit fullscreen mode

Add the source.list reporsitory

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
Enter fullscreen mode Exit fullscreen mode

Update && Install

sudo apt-get update && sudo aptitude install docker-ce docker-ce-cli containerd.io
Enter fullscreen mode Exit fullscreen mode

Docker Compose

Awesome to run the yml files JHipster generates (for databases, code analysis, monitoring and more).

Install Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Make it executable

sudo chmod +x /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

NodeJS && NPM

After installing nodejs from the official repositories, I found that they were kind of outdated, maybe I needed to modify something, but I found this option to work properly.

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
Enter fullscreen mode Exit fullscreen mode

JHipster

Everything is straigth forward and JHipster's installation is not different. Just run

sudo npm install -g generator-jhipster
Enter fullscreen mode Exit fullscreen mode

Note: If you get an error mentioning Error: ENOSPC: System limit for number of file watchers reached, watch 'target/classes', there is an explanation for it:

Listen uses inotify by default on Linux to monitor directories for changes. It's not uncommon to encounter a system limit on the number of files you can monitor. For example, Ubuntu Lucid's (64bit) inotify limit is set to 8192.

You can solve this by running, which will persist on reboot:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Enter fullscreen mode Exit fullscreen mode

Additional Packages

  • Gitter (chat for developers, Jhipster has its chat there too!)
  • Kitematic (Kitematic is a simple application for managing Docker containers on Mac, Linux and Windows.).
  • Gitkraken (Simply the best git client I've ever used)

That's it :)

Top comments (0)