DevStats deployment using docker and managed AuroraDB and ElasticSearch
- Use
./docker/docker_build.shto builddevstats-lfdadocker image. - Use
./docker/docker_bash.shto bash intodevstats-lfdadocker container. - Use
./docker/docker_publish.shto publishdevstats-lfdaimage to the dockerhub. - Use
./docker/docker_remove.shto removedevstats-lfdadocker image. - Use
./docker/docker_cleanup.shto remove all containers and dodocker system prune. - Use
./docker/docker_remove_mapped_data.shto remove all data from directories shared between the host and containers.
- Use
./docker/docker_es.shto start dockerized ElasticSearch 6.5.1 instance. - Use
./docker/docker_es_bash.shto bash into the ElasticSearch container. - Use
./docker/docker_es_indexes.shto see ES indexes. - Use
./docker/docker_es_types.sh indexto see given index types. - Use
./docker/docker_es_values.sh indexto see given index types. - Use
./docker/docker_es_dump.sh indexname filenameto dump ES index into a file. - Use
./docker/docker_es_restore.sh indexname filenameto restore ES index from a file. - Use
./docker/docker_es_query.sh index type queryto query ES instance (allows quick lucene queries). - Use
./docker/docker_es_search.sh index type queryto search ES instance (allows full query search JSON syntax). - Use
./docker/docker_es_logs.shto see ES logs. - Use
./docker/docker_es_health.shto do a health check (after succesfull deployment). It will display some inmdex structures and do some basic queries. - Use
./docker/docker_remove_es.shto remove dockerized postgres instance. - Use
./docker/docker_es_wait.shto wait for the ES docker container become ready.
- Use
PG_PASS=... ./docker/docker_psql.shto start dockerized postgres:11 instance. - Use
PG_PASS=... ./docker/docker_psql_bash.shto bash into the Postgres container. - To deploy from the container use
GHA2DB_GITHUB_OAUTH="`cat /etc/github/oauths`" PG_PASS=... PG_PASS_RO=... PG_PASS_TEAM=... ./docker/docker_deploy_from_container.sh. - It will deploy few Linux Foundation Networking projects into the dockerized postgres.
- It will use
./docker/docker_deploy_all.shscript which currently usesSKIPGRAFANA=1andNOBACKUP=1. - Use
PG_PASS=... ./docker/docker_psql_into_logs_db.shto connect to dockerized postgres host post 65432 -> container port 5432. - Use
PG_PASS=... ./docker/docker_display_logs.shto see deployment logs. - Use
PG_PASS=... ./docker/docker_health.shto do a health check (after succesfull deployment). It will display number of texts in the database. - Use
./docker/docker_remove_psql.shto remove dockerized postgres instance. - Use
PG_PASS=... ./docker/docker_psql_wait.shto wait for the postgres docker container become ready.
- Use
GHA2DB_GITHUB_OAUTH="`cat /etc/github/oauths`" PG_PASS=... ./docker/docker_devstats.shto do devstats sync. This should be run hourly, ideally when new GHA files are available which is about every hour:08.
- Devstats image can be pulled from the docker hub.
- Use
PASS=... ./docker/docker_test_all.shto test full deployment from the container. It will try to use/etc/github/oauthsor/etc/github/oauthas a GitHub OAuth token (if file is present, otherwise it will use public mode - very restricted). - Or specify GitHub OAuth token manually
GHA2DB_GITHUB_OAUTH=... PASS=... ./docker/docker_test_all.shto test full deployment from the container. - Final command on a fresh system should be
clear; GHA2DB_GITHUB_OAUTH=key PASS=test ./docker/docker_test_all.sh. - To use aurora postgres database
clear; GHA2DB_GITHUB_OAUTH=key PASS=test AURORA=1 ./docker/docker_test_all.sh.
You can use vagrant for deployment, use scripts from ./vagrant directory.
To test everything use ./deploy.sh script. Prepend with VAGRANT=1 or DOCKER=1.