GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
636 stars 100 forks source link

Demonstrate pod-dashboard on docker-compose and cloud.gov #917

Closed pburkholder closed 4 years ago

pburkholder commented 5 years ago

https://github.com/GSA/project-open-data-dashboard/pull/188 is the initial PR for demonstrating docker-compose and use of CircleCI for smoke tests

pburkholder commented 5 years ago

@adborden and I reviewed the docker-compose PR and will incorporate --fail on curl, and test again end-to-end.

There are a few steps from the earlier issue to account for:

pburkholder commented 5 years ago

Adding a note here on streaming logs, which I'll come back to after making sure the docker-compose branch works in the CI environment (w/ Ansible).

Most PHP web apps will treat STDOUT as what gets passed to the web server and back to the client, which is why the log_message and write_log functions of CodeIgniter write to a specific path in application/logs. We should be able to use the fpm.d tricks at https://github.com/cloudfoundry/php-buildpack/issues/256 and/or https://github.com/cloudfoundry/php-buildpack/issues/202 to set FPM_CATCH_WORKERS_OUTPUT to yes.

We'll also need to extend CI_Log class with MY_Log and override write_log with our function that looks for $config['log_stdout'] to write to STDOUT.

pburkholder commented 5 years ago

I have ansible and test-kitchen working locally and in the CI environment, so I'm trying to reconcile how we configure dashboard between bsp/ansible and docker and cloud.gov. The WIPI branch at docker-compose-no-templating moves all the application variables to env_vars. The application/config/*.php all are pulled from datagov-deploy templates dir, and then use env vars with the expectation that:

Tuesday I should be able to test and then we can get the BSP env running on the new branch.

pburkholder commented 5 years ago

Some observations about use of S3:

S3 is used in a few places:

The archive_file function will use config[use_local_storage] anytime it's called but the logic doesn't apply when to datajson_lines. The function has a specific exception for that.

S3 also used in the office_detail view and the office controller to build URLS that reference the objects in the archive.

This will require 2 buckets, since they have different ACLs attached.

Also, not all uploads use S3, or all use of archive, when use_local_storage is false. S3 is only used in these particular cases. So json validation uses upload but doesn't pay attention to use_local setting, for example

About some of the files:

pburkholder commented 5 years ago

I'm opening a PR since this is a good merge point before I start getting my hands in the PHP code. I've made a draft PR and need to fix circleCI and some other wonkiness, then I'll let you know when I'm ready.

I'm going to flesh out the what I've done and what needs to be done, then use my remaining hours this week, Monday and 1/2 of Tuesday to actually do those things.

Also, I'm pulling together a few notes for our conversation with Aidan tomorrow.

pburkholder commented 5 years ago

Current considerations for migrating to cloud.gov:

pburkholder commented 5 years ago

I'm updating the title of this so we can close it

mogul commented 4 years ago

All remaining work identified here is now in other issues:

mogul commented 4 years ago

The dashboard app is demoable on cloud.gov at https://app-rested-genet.app.cloud.gov/offices/qa