{"id":38292101,"url":"https://github.com/shieldproject/shield-phalanx","last_synced_at":"2026-01-17T02:11:13.467Z","repository":{"id":122719945,"uuid":"80946003","full_name":"shieldproject/shield-phalanx","owner":"shieldproject","description":"A Bespoke Testing Formation for SHIELD","archived":false,"fork":false,"pushed_at":"2025-02-04T12:57:47.000Z","size":106,"stargazers_count":1,"open_issues_count":3,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-04T13:39:56.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shieldproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-04T20:22:38.000Z","updated_at":"2025-02-04T12:57:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"df49a32e-6c05-40d9-b3e5-786276788dd2","html_url":"https://github.com/shieldproject/shield-phalanx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shieldproject/shield-phalanx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shieldproject%2Fshield-phalanx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shieldproject%2Fshield-phalanx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shieldproject%2Fshield-phalanx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shieldproject%2Fshield-phalanx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shieldproject","download_url":"https://codeload.github.com/shieldproject/shield-phalanx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shieldproject%2Fshield-phalanx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T02:11:13.392Z","updated_at":"2026-01-17T02:11:13.455Z","avatar_url":"https://github.com/shieldproject.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"SHIELD Phalanx\n==============\n\nWelcome to **Phalanx**, a bespoke BOSH release for testing the\nfull-stack functionality of Stark \u0026 Wayne's [SHIELD][1] backup\nsolution.\n\n\nMethodology\n-----------\n\nThe gist of Phalanx is this: spin a bunch of data systems, run a\nhandful of SHIELDs with different configurations, and make sure\nthat backups and (more importantly) restore operations work!\n\n\nSee It Live!\n------------\n\n\u003chttp://ci.starkandwayne.com/teams/main/pipelines/shield\u003e\n\n\nCurrent Scope of Tests\n----------------------\n\nPhalanx currently exercises the following parts of the SHIELD\ndistribution.\n\n### The `s3` Plugin\n\nFor each SHIELD, a new AWS bucket is created to be used for\nstoring backup archives.  This is the only currently supported\nmeans of using the `s3` plugin, so if the rest of the tests\nsucceed, we can bet that the `s3` plugin works for both storage\nand retrieval.\n\nNote: this does not apply to the `s3`-derived `scality` plugin.\n\n### The `postgres` Plugin\n\nTwo databases are created, and filled with some data.\nTwo tests are then carried out - a backup/restore of all\ndatabases, and a backup/restore of just one of the databases.\n\n### The `mysql` Plugin\n\nTwo databases are created, and filled with some data.\nTwo tests are then carried out - a backup/restore of all\ndatabases, and a backup/restore of just one of the databases.\n\n### The `consul` Plugin\n\nTwo keys are created in the remote Consul Key-Value store, via the\nremote HTTP API (on port 8500).  Then, a backup is performed\nagainst Consul, and the keys are altered.  After the backup is\nrestored, we check to make sure the keys revert to their original\nvalues.\n\n\nDeploying it Yourself\n---------------------\n\nIf you want to do in-depth SHIELD development, you may want to\ndeploy your own copy of Phalanx, on a BOSH-lite.  Here's the steps\nto get you started.\n\nFirst, generate a manifest:\n\n```\n./templates/make_manifest\n```\n\nThen, you're going to need to provide a release tarball of the\nSHIELD you want to test.  From your SHIELD repository, run:\n\n```\nmake release VERSION=0.9.2-rc.3        # change version as needed\ncp artifacts/shield-server-linux-amd64.tar.gz \\\n   path/to/phalanx/src/shield-rc/\n```\n\nThen, cut a new (development) BOSH release and deploy your\nmanifest:\n\n```\nbosh create release --force\nbosh upload release\nbosh -n deploy\n```\n\nOnce that's done, just run the `tests` errand:\n\n```\nbosh run errand tests\n```\n\nIf things don't turn out well, you may want to run the errand with\nthe `--keep-alive` flag, and then `bosh ssh` into the `tests/0`\ninstance and poke around.\n\n\nWriting new Tests\n-----------------\n\nTests exist as scripts inside of the\n`/var/vcap/jobs/run-tests/tests` directory on the errand VM.  All\nyou have to do to create a new test is add it to the `run-tests`\njob spec, and create the files.\n\nHere's a template script to get you started!\n\n```\n#!/bin/bash\nsource /var/vcap/jobs/run-tests/lib/functions system-name\n\nrc=0\necho \"\u003e My New Test\"\necho \"\u003e\u003e setting up test data\"\n# FIXME: set up the data\n\necho \"\u003e\u003e configuring SHIELD\"\nshield create-target \u003c\u003cEOF | jq -r\n{\n  \"name\"     : \"foo\",\n  \"summary\"  : \"Foo\",\n  \"plugin\"   : \"foo\",\n  \"endpoint\" : \"{}\",\n  \"agent\"    : \"$TARGET:5444\"\n}\nEOF\nshield create-job \u003c\u003cEOF | jq -r\n{\n  \"name\"      : \"foo-daily\",\n  \"summary\"   : \"Foo\",\n  \"paused\"    : true,\n  \"retention\" : \"$RETENTION_UUID\",\n  \"schedule\"  : \"$SCHEDULE_UUID\",\n  \"store\"     : \"$STORE_UUID\",\n  \"target\"    : \"$(shield target foo | jq -r '.uuid')\"\n}\nEOF\n\necho \"\u003e\u003e running backup job\"\nwait_for_task $(shield run $(shield job foo-daily | jq -r '.uuid') | jq -r '.task_uuid')\n\necho \"\u003e\u003e trashing the data\"\n# FIXME: trash the data by deleting stuff, changing stuff, etc.\n\necho \"\u003e\u003e restoring from backups\"\nwait_for_task $(shield restore $(shield archives -t $(shield target foo | jq -r '.uuid') | jq -r '.[0].uuid') | jq -r '.task_uuid')\n\n# FIXME: validate the data, post-restore,\n# FIXME: setting rc=\u003cnon-zero\u003e on failure.\n\nexit $rc;\n```\n\n\nFuture Work\n-----------\n\nThe following tests need to be conceptualized and implemented.\n\n- A test of the `consul` plugin, against a Consul Key-Value store\n  that requires HTTP Basic Authentication.\n- A test of the `mongo` plugin, against a MongoDB instance that\n  requires authentication.\n- Tests for all of the following plugins:\n  - docker-postgres\n  - elasticsearch\n  - rabbitmq-broker\n  - redis-broker\n  - scality\n  - xtrabackup\n\n\n[1]: https://github.com/starkandwayne/shield\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshieldproject%2Fshield-phalanx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshieldproject%2Fshield-phalanx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshieldproject%2Fshield-phalanx/lists"}