Git Product home page Git Product logo

jhipster-devbox's Introduction

JHipster official "development box"

Introduction

This is a Vagrant configuration to set up a complete, virtualized development environment for JHipster users.

  1. Usage
  2. Installation
  3. Customize your virtual machine
  4. Configure your new box and install new software

Usage

The JHipster "development box" is a complete development environment for JHipster users.

It requires to have Vagrant installed on your machine.

It is fully based on Open Source software, and most importantly on:

  • Ubuntu
  • OpenJDK (Oracle JDK can't be used because of license issues)
  • Node, NPM and Yarn
  • Docker and Docker Compose (see the JHipster Docker Compose documentation to learn how to run your application, database or even a full micro-service architecture with Docker)
  • Ubuntu Make so you can easily install your favorite IDE (type umake ide idea for Intellij IDEA or umake ide eclipse for Eclipse)
  • Chromium and Firefox Web browsers

This "development box" also have all client applications useful for working with a JHipster application:

  • MySQL Workbench
  • pgAdmin 3
  • MongoDB client
  • Cassandra command line (cqlsh)
  • Cloud Foundry command line (cf)
  • Heroku toolbelt

Installation

The "Quick installation" provides a pre-build Virtual Machine, and the "Manual installation" let you build your Virtual Machine yourself. We recommend you use the "Quick installation" if you don't know which option to choose.

Quick installation

Pre-built distributions of this "development box" are available on Vagrant Cloud.

To install the latest distribution, please run:

On Mac or Linux

vagrant init jhipster/jhipster-devbox; vagrant up --provider virtualbox

On Windows

vagrant init jhipster/jhipster-devbox

vagrant up --provider virtualbox

You can then tune your installation, by following the next sections on customizing and configuring your "development box".

Manual installation

This generates a new "development box" directly from this repository.

  • Clone this repository: git clone https://github.com/jhipster/jhipster-devbox.git
  • It is wise to use a tag to have a stable version: the JHipster DevBox tags are the same as the JHipster Generator tags, so using the DevBox v3.2.0 also means using the generator v3.2.0
  • Run vagrant up

Customize your virtual machine

This is very important! Modify your system properties, depending on your host's hardware. We recommend, at least:

  • 4 CPUs
  • 8 Gb of RAM
  • 128 Mb of video RAM

Configure your new box and install new software

Start up the new box:

  • Login using the vagrant user (not the 'Ubuntu' user which is selected by default)
    • Password is vagrant (please note that default keyboard layout is US!)
  • Configure your keyboard, if you are not using an English keyboard, once you have logged in:
    • Go to Settings > Keyboard
    • Open the Layout tab
    • Untick the Use system default box
    • Use the + sign to add your keyboard layout
  • Configure your IDE
    • Use Ubuntu Make so you can easily install your favorite IDE:
      • Type umake ide idea for Intellij IDEA
      • Type umake ide eclipse for Eclipse
  • Configure you browser
    • Firefox is installed
    • Chromium, which is the Open-Source version of Google Chrome, is also installed
  • Other available tools
  • Generate your application
    • Run yo jhipster and use JHipster normally
  • Configure your database
    • Run your database with Docker. For example, for MySQL use docker-compose -f src/main/docker/mysql.yml up
    • In your application, don't forget to edit your application-dev.yml and application-prod.yml files so you have the correct connection setup for your database server
  • Use the JHipster tools
    • Running ./mvnw will run your JHipster application on port 8080. As this port is forwarded to your host, you can also use http://localhost:8080 on your host machine
    • Running gulp will launch your AngularJS front-end with BrowserSync on port 9000: it is also forwarded to your host, so you can also use http://localhost:9000 on your host machine

jhipster-devbox's People

Contributors

bhawanisingh avatar cbornet avatar colameo avatar conorgdaly avatar danielfran avatar jdubois avatar mathieuaa avatar pasali avatar pascalgrimaud avatar pierrebesson avatar robertmilowski avatar ruddell avatar sdoxsee avatar sudharakap avatar yhippa avatar yodeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jhipster-devbox's Issues

Not compatible with Docker for Windows

I have windows 10 installed on my machine and used to this Vagrant image for Java developing.

Recently i installed Docker for Windows which uses Hyper-V and can't use virtualbox anymore. Thus this Vagrant image is also unavailable for me.
I would like to use Docker for Windows and this Vagrant image simultaneously, which is impossible with VirtualBox provider.

I saw in documentation that Docker can be used as vagrant provider, but this image is built for VBox.
I suggest to support Docker provider for this image if it is possible.

Add Kitematic

It would be useful to have Kitematic in the devbox as it can now be packaged as a .deb (see this kitematic PR).

The only problem is that we have to build the .deb ourself, I don't see it being distributed by Docker any time soon as the Linux support is community contributed.

To try it:

curl -O https://github.com/PierreBesson/jhipster-devbox/blob/install-kitematic/packages/Kitematic_0.10.2-1_amd64.deb
sudo dpkg -i dist/Kitematic_0.10.2-1_amd64.deb

Create a devbox for yeoman generator developer

As far as I understand this devbox is for developers which work with the generated application. Is there any interest in a devbox for developers which work on the yeoman generator. This devbox could have the following features:

  • Atom-Editor
  • Cloned jhipster-generator repo
  • All sample apps cloned
  • All SDK for the deployment subgen installed

What are your opinions about that?

Vagrant cannot connect in ssh

After vagrant init, the default user to connect to the box will be "vagrant" but it doesn't exist on the box
Without ssh, most vagrant commands will not work and you can't mount the shared directories.

Two solutions:

  • after vagrant init, set in Vagrantfile
config.ssh.username = "jhipster"
config.ssh.password = "jhipster"
  • create the user vagrant during provisioning
useradd vagrant --password wthgG9Dxlk13E --home /home/vagrant --create-home -s /bin/bash
echo "vagrant ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vagrant
mkdir -p /home/vagrant/.ssh
wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys
chmod 0700 /home/vagrant/.ssh
chmod 0600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh

and config.ssh.insert_key = false (otherwise the vagrant will try to use the ubuntu private_key)

Disk too small

The previous ubuntu image had a 40G disk. The new one has only 10G and its already almost full when you first start it.
I often have a lot of disk/FS errors when starting the VM (in that case I need to restart it completely) and I suspect it is due to this.

Postgre instead of mysql

jhipster is proposing to use H2 or postgre as a dev database and not mysql.
The "fast" profile recommends to use a non-memory database.
Would it not be nice to have postgre instead mysql (or both)?

Error: The requested URL returned error: 407

Do i need a atlas login ?

D:\jhipster-devbox>vagrant box add jhipster/jhipster-devbox
The box 'jhipster/jhipster-devbox' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/jhipster/jhipster-devbox"]
Error: The requested URL returned error: 407

Default language is setted to french

After log in into the VM by Virtual Box interface, system (xubuntu) is by default in french language, also the home folders are localized in french ( i.e. Desktop -> Bureau )
My host system is in English

image

SSL certificate problem: unable to get local issuer certificate

  I am trying to use the latest version ( Upgrade to JHipster 2.25.0) but I have encountered the following problem:

image

Windows 8.1
Vagrant 1.7.3 (with Vagrant 1.7.4 fails even when trying to download the image).

I suppose it's a configuration problem in my windows environment  or a Vagrant bug. I will post the solution to help other users.

Thanks for your support!

Install VSCode

Since everybody likes VSCode, we should install it instead of Atom (very easy vith ubuntu-make)
What extensions would you like to see installed ?

Add STS to PATH

Or create an alias so that STS can easily be started from a terminal

Relaunchable provisionning

It would be great to be able to update an existing devbox with the latest script by just calling vagrant reload --provision

Forward more ports for micro services

The current configuration forwards only ports 8080 and 9000 which are the default ones for working on a monolith app, shouldn't we make it easier for micro services apps too by including port ranges like below?

# JHipster registry default port
config.vm.network :forwarded_port, guest: 8761, host: 8761
# Spring boot ports
for p in 8080..8090
    config.vm.network :forwarded_port, guest: p, host: p
end
# browser-sync ports
for p in 9000..9010
    config.vm.network :forwarded_port, guest: p, host: p
end

outdated README

STS now installed to /opt (/opt/sts-bundle/). README needs updating

Add sudo user in documentation (README.md)

Using sudo with vagrant user gives this error:

sudo apt-get update
>>> /etc/sudoers: syntax error near line 31 <<<
sudo: parse error in /etc/sudoers near line 31
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I cannot find in documentation wich user should be used to do sudo commands.

Devbox 4.13.3 not published

When I try to update the devbox to the current version, only version 4.13.2 is offered.

When I try to pin to the version 4.13.3 using the Vagrantfile available at https://app.vagrantup.com/jhipster/boxes/jhipster-devbox/versions/4.13.3, I get the the following error message:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'jhipster/jhipster-devbox' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: 4.13.3
==> default: Loading metadata for box 'jhipster/jhipster-devbox'
default: URL: https://vagrantcloud.com/jhipster/jhipster-devbox
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: jhipster/jhipster-devbox
Address: https://vagrantcloud.com/jhipster/jhipster-devbox
Constraints: 4.13.3
Available versions: 0.2.2, 0.2.3, 0.2.4, 2.26.1, 2.26.2, 2.27.0, 2.27.1, 2.27.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1.1, 3.2.1.2, 3.2.1.3, 3.2.1.4, 3.3.0, 3.4.0, 3.4.1, 3.4.2, 3.5.0, 3.5.1, 3.6.0, 3.6.1, 3.7.0, 3.7.1, 3.8.0, 3.9.0, 3.9.1, 3.10.0, 3.11.0, 3.12.0, 3.12.1, 3.12.2, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.4.0, 4.4.1, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.5.4, 4.5.5, 4.5.6, 4.6.0, 4.6.1, 4.6.2, 4.7.0, 4.8.0, 4.8.1, 4.8.2, 4.9.0, 4.10.0, 4.10.1, 4.10.2, 4.11.0, 4.11.1, 4.12.0, 4.13.0, 4.13.1, 4.13.2

User Julien hardcoded on vagrant image

Using the quickstart installation procedure on windows:

Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file /Users/julien/workspace/jhipster-devbox/ubuntu-xenial-16.04-cloudimg-console.log (VERR_PATH_NOT_FOUND)

Unable to install Guake terminal

When trying to install Guake terminal utility from Ubuntu Software Center I am being asked by "ubuntu" user's password. What is the password for "ubuntu" user?

Fails on Windows

This is because of

config.vm.synced_folder "~/jhipster", "/home/vagrant/jhipster"

Windows can't find ~/jhipster (obviously)

Error in logs

I launch the installation with vagrant up > log.txt
Here the full log: log.txt

It need to be analyzed, as there are some errors. Here, 2 of them:

ERROR: Unhandled exception
==> default: Traceback (most recent call last):
==> default:   File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper
==> default:     function(*args, **kwargs)
==> default:   File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py", line 418, in decompress_and_install_done
==> default:     self.mark_in_config()
==> default:   File "/usr/lib/python3/dist-packages/umake/frameworks/__init__.py", line 266, in mark_in_config
==> default:     ConfigHandler().config = config
==> default:   File "/usr/lib/python3/dist-packages/umake/tools.py", line 107, in config
==> default:     with open(config_file, 'w') as f:
==> default: PermissionError: [Errno 13] Permission denied: '/home/vagrant/.config/umake'
==> default: |#############################################################################|
==> default: Downloading and installing requirements
==> default: Installing Visual Studio Code
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
==> default: [ { Error: EACCES: permission denied, mkdir '/home/vagrant/.config/Code'
==> default:       at Error (native)
==> default:     errno: -13,
==> default:     code: 'EACCES',
==> default:     syscall: 'mkdir',
==> default:     path: '/home/vagrant/.config/Code' } ]
ERROR: Unhandled exception
==> default: Traceback (most recent call last):
==> default:   File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper
==> default:     function(*args, **kwargs)
==> default:   File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py", line 418, in decompress_and_install_done
==> default:     self.mark_in_config()
==> default:   File "/usr/lib/python3/dist-packages/umake/frameworks/__init__.py", line 266, in mark_in_config
==> default:     ConfigHandler().config = config
==> default:   File "/usr/lib/python3/dist-packages/umake/tools.py", line 107, in config
==> default:     with open(config_file, 'w') as f:
==> default: PermissionError: [Errno 13] Permission denied: '/home/vagrant/.config/umake'

Maintainer request

Hello
I would like to maintain this project, I've been using jhipster since gulp time, so I would like to contribute to the project

How is zsh setup as default shell for vagrant account ?

Hi,
Apologies for the rookie Unix/Linux question but why is it the vagrant account ends up with zsh as its default shell when bash is listed as the default choice for that user in /etc/passwd ?
Thank you very much in advance for your patience.
Regards
kbjp

Not able to login after system is locked.

Version : 3.3.0

Host OS: Windows 10

Issue: Not able to login with username and password as vagrant.

I can only login when I boot and if system gets locked, the password vagrant doesn't unlock the system.
Screen flashes and settles down to Locked screen.

PS: It does not give password error. vagrant is correct password but can't unlock system with it.

webdriver-manager is requiring root rights

When executing webdriver-manager update command (automatically executed by mvn), it does not have the necessary rights to write to /usr/lib/nodes_module.
If I execute as root the update command, it works. But when I execute again mvn, even if no driver has to be updated, it tries a chmod, resulting in a failure.
Execute mvn as root fails also on bower.

I following this guides so I am able to install globally npm-based commands:
https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md

I would recommand such configuration to prevent issues

How to run GUI?

Hi,

This is probably a silly question as I'm a newbie at JHipster.

I've just installed jhipster-devbox without problems, and connected by SSH. However, if aI understood properly you need to setup an IDE (obviously) in order to customize your JHipster application, and here is my question?

  • If I use my host OS instead of Vagrant, do I have to share a folder with my host OS?

  • If I prefer to do everthing inside the vagrant instance, if I can only use SSH, How am I supposed to access to GUI?

Sorry for the silly question, but I couldnt' find the solution out on the Internet,...

Many thanks,

Javier.

Switch to xubuntu

  • At all my trainings people have trouble using Ubuntu Desktop
  • XUbuntu is lighter, so I hope it will work faster

Update Java SSL cacert

I had to do this on my devbox to have up-to-date cacerts for the JVM

apt-get install -y ca-certificates ca-certificates-java
# Patch the ca-certificates-java script to use our Java 
sed -i -e 's/java-6-sun/java-${JAVA_VERSION}-oracle/g' /etc/ca-certificates/update.d/jks-keystore
update-ca-certificates 
# Modify the JDK installation to use our local cacerts 
mv -v ${JAVA_HOME}/jre/lib/security/cacerts ${JAVA_HOME}/jre/lib/security/cacerts.original
ln -vs /etc/ssl/certs/java/cacerts ${JAVA_HOME}/jre/lib/security

Migrate from STS to IDEA Community Edition

I just completed a training and we had so many issues with STS.... I use IDEA Ultimate Edition, but the Community Edition is free and enough to work on a normal JHipster project.
So my proposal is to migrate to IDEA Community Edition in the devbox.

Issue when generating project with linked generator

I have errors when generating a project after linking to my cloned generator-jhipster

Steps to reproduce:

  • login as jhipster
  • clone generator-jhipster
  • sudo npm link
  • create a new project
  • yo jhipster
    --> error

I think is because the node_modules inside /usr/lib belong to the ubuntu group (as they were pulled by the ubuntu user during box generation)
If I change ownership to jhipster, then it works again.

It's really a pain that the ubuntu box doesn't respect the vagrant user requirement...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.