Skip to content

Commit

Permalink
Merge pull request #5 from bacpop/bacpop-159-v8-db-deploy
Browse files Browse the repository at this point in the history
Bacpop-159 v8 db update
  • Loading branch information
EmmaLRussell authored Mar 26, 2024
2 parents d580d42 + 306d9fc commit 33528d5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
3 changes: 1 addition & 2 deletions config/beebop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ api:
repo: mrcide
name: beebop-py
tag: main
db_location: ./storage/GPS_v6_references
use_small_db: true
db_location: ./storage/GPS_v8_ref
storage_location: ./storage
redis:
image:
Expand Down
3 changes: 1 addition & 2 deletions config/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ vault:
auth:
method: github
api:
db_location: ./storage/GPS_v6
use_small_db: false
db_location: ./storage/GPS_v8_ref
worker:
count: 5
5 changes: 0 additions & 5 deletions src/beebop_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ def __init__(self, path, config_name=None, options=None):
self.api_db_location = config.config_string(
dat, ["api", "db_location"])
self.api_db_name = os.path.basename(self.api_db_location)
self.api_use_small_db = config.config_boolean(
dat, ["api", "use_small_db"])

# worker and api always the same image
self.worker_ref = constellation.ImageReference(
Expand Down Expand Up @@ -176,9 +174,6 @@ def api_configure(container, cfg):
else:
print("[api] Downloading storage database")
args = ["./scripts/download_db"]
if cfg.api_use_small_db:
args = args + ["--small"]
args = args + ["storage"]
mounts = [docker.types.Mount("/beebop/storage",
cfg.volumes["storage"])]
container.client.containers.run(str(cfg.api_ref), args, mounts=mounts,
Expand Down
16 changes: 8 additions & 8 deletions test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ def test_start_beebop():
obj.status()
obj.start()

assert docker_util.network_exists("beebop_nw")
assert docker_util.volume_exists("beebop_storage")
assert docker_util.container_exists("beebop-api")
assert docker_util.container_exists("beebop-redis")
assert docker_util.container_exists("beebop-server")
assert docker_util.container_exists("beebop-proxy")
assert len(docker_util.containers_matching("beebop-worker-", False)) == 2

# ignore SSL
session = requests.Session()
session.verify = False
Expand All @@ -24,14 +32,6 @@ def test_start_beebop():
assert res.status_code == 200
assert json.loads(res.content)["message"] == "Welcome to beebop!"

assert docker_util.network_exists("beebop_nw")
assert docker_util.volume_exists("beebop_storage")
assert docker_util.container_exists("beebop-api")
assert docker_util.container_exists("beebop-redis")
assert docker_util.container_exists("beebop-server")
assert docker_util.container_exists("beebop-proxy")
assert len(docker_util.containers_matching("beebop-worker-", False)) == 2

obj.destroy()

assert not docker_util.network_exists("beebop_nw")
Expand Down

0 comments on commit 33528d5

Please sign in to comment.