Giter Club home page Giter Club logo

bahmni-vagrant's Introduction

bahmni-vagrant

Management of Vagrant box using Packer. Out-Of-The-Box bahmni on CentOS 6.8

Vagrant / Virtual Box Setup for Bahmni

Please follow the steps mentioned in this document on wiki to setup Bahmni Vagrant Box on your machine: Bahmni Vagrant Box Setup

Understanding Packer (For Developers)

Packer is a tool provided by Hashicorp, for creating a Vagrant box out of template VMs. This repository contains Packer code for creating Bahmni vagrant boxes. For more details on understanding Packer please read: https://www.packer.io/intro/

In Bahmni's case, we invoke Packer command with reference to file: template.json. It uses a CentOS VM as reference, and then runs appropriate scripts, including installing Bahmni and dev tools, etc.

Note: Packer runs on Bahmni CI server in pipeline "Release_To_Public" (manually triggered stage). One must trigger this stage after having marked relevant RPMs as "published" on bintray, so that when Packer runs, it picks up the LATEST published RPMs from bintray.

bahmni-vagrant's People

Contributors

aj-jaswanth avatar binduak avatar individual-it avatar lispyclouds avatar m0un10 avatar mdjnewman avatar padmavati avatar preethi29 avatar

Stargazers

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

bahmni-vagrant's Issues

Server Error: emrapi.sqlSearch.activePatientsByLocation

When doing a vagrant up using 05bd8dd, I'm seeing "Server Error: emrapi.sqlSearch.activePatientsByLocation" when going to https://192.168.33.10/bahmni/clinical/.

I'm using an unmodified Vagrantfile and bahmni-team/bahmni version 0.78.5257.1.

Is this due to an incompatibility between the front- and back-end packages installed in the vagrant box?

From my browser's debug tools, I can see the request returning a 500 status is https://192.168.33.10/openmrs/ws/rest/v1/bahmnicore/sql?location_uuid=c5854fd7-3f12-11e4-adec-0800271c1b75&provider_uuid=c1c26908-3f10-11e4-adec-0800271c1b75&q=emrapi.sqlSearch.activePatientsByLocation&v=full. Full content of the response:

{
    "error": {
        "message": "No such query:emrapi.sqlSearch.activePatientsByLocation",
        "code": "org.bahmni.module.bahmnicore.service.impl.SqlSearchServiceImpl:46",
        "detail": "java.lang.RuntimeException: No such query:emrapi.sqlSearch.activePatientsByLocation\n\tat org.bahmni.module.bahmnicore.service.impl.SqlSearchServiceImpl.getSql(SqlSearchServiceImpl.java:46)\n\tat org.bahmni.module.bahmnicore.service.impl.SqlSearchServiceImpl.search(SqlSearchServiceImpl.java:29)\n\tat org.bahmni.module.bahmnicore.web.v1_0.controller.SqlSearchController.search(SqlSearchController.java:33)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)\n\tat org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)\n\tat org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:618)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:725)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:61)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72)\n\tat org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:64)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)\n\tat org.openmrs.module.webservices.rest.web.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:108)\n\tat org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)\n\tat org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:73)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)\n\tat org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:230)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)\n\tat org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat java.lang.Thread.run(Unknown Source)\n"
    }
}

Vagrant error: replacing SSH key

When running vagrant up on OSX, I get an error: "Timed out while waiting for the machine to boot." See full error listing at the end of this issue.

It turns out that Vagrant is unable to SSH to the box after replacing the insecure SSH key.

It can be fixed by modifying the Vagrantfile as follows. I'm not sure whether this is an acceptable fix for Bahmni/bahmni-vagrant or something else in the tooling can be upgraded.

diff --git a/Vagrantfile b/Vagrantfile
index 490329a..b7fc704 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -3,6 +3,7 @@

 Vagrant.configure(2) do |config|
   config.vm.box = "bahmni-team/bahmni"
+  config.ssh.insert_key = false
   config.vm.box_check_update = true
   config.vm.network "private_network", ip: "192.168.33.10"

Environment:

  • bahmni-vagrant commit: a6872da
  • Vagrant box: bahmni-team/bahmni (virtualbox, 0.83)
  • Installed: vagrant: 1.8.5; virtualbox: 5.1.4-110228
  • OS: Darwin Kernel Version 15.6.0

Full error listing:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bahmni-team/bahmni'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bahmni-team/bahmni' is up to date...
==> default: Setting the name of the VM: bahmni-vagrant_default_1472036968010_84673
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customisations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

While trying to clone the bahmni box this error occurs

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bahmni-team/bahmni' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'bahmni-team/bahmni'
default: URL: https://atlas.hashicorp.com/bahmni-team/bahmni
==> default: Adding box 'bahmni-team/bahmni' (v0.85) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/bahmni-team/boxes/bahmni/versions/0.85/providers/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

GnuTLS recv error (-9): A TLS packet with unexpected length was received.
[1]+ Killed vagrant up

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.