Unable to install core framework in cloud instance

We are trying to setup the core framework on a Ubuntu compute instance in the google cloud instance. We have been able to setup docker and docker compose.(from links https://github.com/medic/cht-core/blob/master/INSTALL.md)

Is the installation complete after giving the command ?
‘docker compose up’

We are unable to access the app at http://

Can we access the app only at http://localhost??

Are there any other setup instructions for setting up on the cloud

2 Likes

The app should be accessible remotely too, provided that the ports are open (80 for http, 443 for https). Did you try with https?

What is the output you see after giving the command docker compose up?

If you don’t see anything, can you try looking at the logs of the docker containers by running this command:
docker ps medic-os

docker logs <container_name> will give you the log output. You can use docker ps to list the running container names. More about docker logs can be found here

2 Likes

Hi Thara! Thanks for setting up our app :slight_smile:

As Binod pointed out, the app will be accessible remotely, but there are some remaining steps. Once you have confirmed all the services are running properly via reading the logs and answering his questions, you will want to complete a few additional steps for remote connectivity.

For example, if you want to access the application when you visit https://app.thara.com, you will want to:

If you are planning to run this app for a real-life scenario, we would also recommend setting up SSL certifications for app.thara.com, otherwise you will be running into a browser warning.

Thanks again for your post! We are striving for the most seamless setup possible.

2 Likes

Hi Binod

Thanks a lot for the response.

Below is the log output from the ‘docker logs medic-os’ command.

[2019/12/27 08:03:00] Info: Setting up software…
[2019/12/27 08:03:00] Info: Running setup task ‘horticulturalist/sudoers’
[2019/12/27 08:03:00] Info: Running setup task ‘horticulturalist/users’
[2019/12/27 08:03:00] Info: Service ‘horticulturalist/horticulturalist’ started successfully
[2019/12/27 08:03:01] Info: Setting up software (14% complete)…
[2019/12/27 08:03:01] Info: Running setup task ‘medic-api/link-logs’
[2019/12/27 08:03:01] Info: Running setup task ‘medic-api/logrotate’
[2019/12/27 08:03:01] Info: Running setup task ‘medic-api/users’
[2019/12/27 08:03:01] Info: Service ‘medic-api/medic-api’ started successfully
[2019/12/27 08:03:01] Info: Setting up software (28% complete)…
[2019/12/27 08:03:07] Info: Running setup task ‘medic-core/ldconfig’
[2019/12/27 08:03:07] Info: Running setup task ‘medic-core/link-logs’
[2019/12/27 08:03:07] Info: Running setup task ‘medic-core/logrotate’
[2019/12/27 08:03:07] Info: Running setup task ‘medic-core/nginx’
[2019/12/27 08:03:07] Info: Running setup task ‘medic-core/nginx-ssl’
[2019/12/27 08:03:08] Info: Running setup task ‘medic-core/profile’
[2019/12/27 08:03:08] Info: Running setup task ‘medic-core/ssh-authorized-keys’
[2019/12/27 08:03:08] Info: Running setup task ‘medic-core/ssh-keygen’
[2019/12/27 08:03:09] Info: Running setup task ‘medic-core/usb-modeswitch’
[2019/12/27 08:03:09] Info: Service ‘medic-core/couchdb’ started successfully
[2019/12/27 08:03:09] Info: Service ‘medic-core/nginx’ started successfully
[2019/12/27 08:03:09] Info: Setting up CouchDB for the first time
[2019/12/27 08:03:09] Info: Service ‘medic-core/openssh’ started successfully
[2019/12/27 08:03:11] Info: Setting up software (42% complete)…
[2019/12/27 08:03:11] Info: Creating system databases
[2019/12/27 08:03:12] Info: Running setup task ‘medic-couch2pg/link-logs’
[2019/12/27 08:03:12] Info: Running setup task ‘medic-couch2pg/logrotate’
[2019/12/27 08:03:12] Info: Setting up CouchDB administrative account
[2019/12/27 08:03:12] Info: Service ‘medic-couch2pg/medic-couch2pg’ started successfully
[2019/12/27 08:03:12] Info: Restricting CouchDB to authorized users only
[2019/12/27 08:03:12] Info: Setting up software (57% complete)…
[2019/12/27 08:03:12] Info: Creating CouchDB service accounts
[2019/12/27 08:03:12] Info: New CouchDB Administrative User: medic
[2019/12/27 08:03:12] Warning: A new administrative password was explicitly set via the CLI
[2019/12/27 08:03:12] Warning: The new administrative password will not be displayed
[2019/12/27 08:03:12] Info: CouchDB first-run setup successful
[2019/12/27 08:03:13] Info: Horticulturalist is now bootstrapping
[2019/12/27 08:03:15] Info: Running setup task ‘medic-rdbms/ldconfig’
[2019/12/27 08:03:15] Info: Running setup task ‘medic-rdbms/link-logs’
[2019/12/27 08:03:15] Info: Running setup task ‘medic-rdbms/reconfigure’
[2019/12/27 08:03:15] Info: Service ‘medic-rdbms/postgresql’ started successfully
[2019/12/27 08:03:15] Info: Setting up software (71% complete)…
[2019/12/27 08:03:15] Info: Running setup task ‘medic-sentinel/link-logs’
[2019/12/27 08:03:15] Info: Running setup task ‘medic-sentinel/logrotate’
[2019/12/27 08:03:15] Info: Running setup task ‘medic-sentinel/users’
[2019/12/27 08:03:15] Info: Service ‘medic-sentinel/medic-sentinel’ started successfully
[2019/12/27 08:03:16] Info: Setting up software (85% complete)…
[2019/12/27 08:03:16] Info: Running setup task ‘system-services/home-directories’
[2019/12/27 08:03:16] Info: Running setup task ‘system-services/link-logs’
[2019/12/27 08:03:16] Info: Running setup task ‘system-services/logrotate’
[2019/12/27 08:03:16] Info: Service ‘system-services/cron’ started successfully
[2019/12/27 08:03:16] Info: Service ‘system-services/syslog’ started successfully
[2019/12/27 08:03:16] Info: Setting up software (100% complete)…
[2019/12/27 08:03:16] Info: Starting services…
[2019/12/27 08:03:16] Info: Synchronizing disks…
[2019/12/27 08:03:26] Info: System started successfully
[2019/12/27 08:03:26] Info: Starting log streaming
[2019/12/27 08:04:14] Info: Horticulturalist bootstrapping complete

We are trying to access the app using the instance ip address at port 80.(not static ip)
Also the ‘docker compose up’ takes a long time to complete and most of the time the connection to the instance is lost. The above logs have been fetched after reconnecting to the instance.

I will try to get one successful run of the ‘docker compose up’ command and check the logs. We will also setup static ip for the instance and check.

Do you see any errors in the installation from the logs? The app is still not accessible at port 80.

Thanks for the same.

Hi Hareet

Thanks a lot for the response.
I have pasted the logs in reply to Binod’s post.

We will try to setup the static external IP for the installation and get back. We are not using any domain for this installation currently so we will be using it with a static ip address currently.

Thanks
Thara

Thanks Thara!

The instance IP address will work as well for testing remote connectivity, no need to pay for a Static External IP until you are ready.

Let’s verify some network settings and pull more detailed information regarding this install:

  • Can you verify that your server has the correct network settings to allow access from port 80 + 443?

  • Can you also provide the results from the commands below?

Log into the container via:
$ docker exec -it medic-os /bin/bash

Inside the container, please run:

netstat -lt
ls -lA /srv/software/medic-api/
tail -n 25 /srv/storage/medic-api/logs/medic-api.log
tail -n 25 /srv/storage/medic-core/couchdb/logs/startup.log

-Hareet

1 Like

Hi Hareet

Thanks for your pointers.
After opening port 443, we are able to access and login to the app.
Thanks for the same.

Also, is it possible to create our own forms and upload to the system instead of using the available hierarchy, household, healthfacility, hospital, healthcenter etc…
If so, what are the steps to customize? Do we need further installations.

Thanks & Regards
Thara S

Great to know that you can now access the app.

You sure can create your own forms, hierarchy and other components. For that, you can follow the instructions given in this documentation.
Let us know if you face any specific problems.

Thanks

1 Like