blis-cloud-cli 0.1.2__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/PKG-INFO +8 -8
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/docker.py +3 -3
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/logs.py +1 -1
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/update.py +5 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/docker-compose.yml +2 -2
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/config.py +17 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/pyproject.toml +8 -8
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/LICENSE +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/README.md +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/__init__.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/blis.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/__init__.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/domain.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/install.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/start.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/status.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/stop.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/commands/swap.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/001-blis_revamp.sql +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/002-blis_127.sql +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/003-blis_revamp-seed.sql +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/004-blis_127-seed.sql +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/extra/templates/Caddyfile.j2 +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/__init__.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/bash.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/caddy.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/docker_util.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/environment.py +0 -0
- {blis_cloud_cli-0.1.2 → blis_cloud_cli-0.2.1}/blis_cli/util/packages.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blis-cloud-cli
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Command-line tool for the BLIS web-based lab information system.
|
|
5
5
|
Home-page: https://c4gblis.org/
|
|
6
6
|
License: MIT
|
|
@@ -14,13 +14,13 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Requires-Dist: Jinja2 (>=3.1
|
|
18
|
-
Requires-Dist: PyYAML (>=6.0
|
|
19
|
-
Requires-Dist: click (>=8.1
|
|
20
|
-
Requires-Dist: colorama (>=0.4
|
|
21
|
-
Requires-Dist: docker (>=6.1
|
|
22
|
-
Requires-Dist: psutil (>=5.9
|
|
23
|
-
Requires-Dist: requests (>=2.
|
|
17
|
+
Requires-Dist: Jinja2 (>=3.1,<4.0)
|
|
18
|
+
Requires-Dist: PyYAML (>=6.0,<7.0)
|
|
19
|
+
Requires-Dist: click (>=8.1,<9.0)
|
|
20
|
+
Requires-Dist: colorama (>=0.4,<1.0)
|
|
21
|
+
Requires-Dist: docker (>=6.1,<7.0)
|
|
22
|
+
Requires-Dist: psutil (>=5.9,<6.0)
|
|
23
|
+
Requires-Dist: requests (>=2.25,<3.0)
|
|
24
24
|
Project-URL: Repository, https://github.com/C4G/blis-cloud-cli
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
@@ -17,7 +17,7 @@ def entrypoint():
|
|
|
17
17
|
pass
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
@click.command
|
|
20
|
+
@click.command()
|
|
21
21
|
def install():
|
|
22
22
|
# If Docker is installed, and we are in the docker group, we will not need root privileges.
|
|
23
23
|
if not (env.in_docker_grp() and docker_util.installed()):
|
|
@@ -82,7 +82,7 @@ def install_docker():
|
|
|
82
82
|
click.echo("Please log out and log back in, and run this command again.")
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
@click.command
|
|
85
|
+
@click.command()
|
|
86
86
|
def purge():
|
|
87
87
|
if not env.can_sudo():
|
|
88
88
|
click.secho("You must have root privileges to run this.", fg="red")
|
|
@@ -101,7 +101,7 @@ def purge():
|
|
|
101
101
|
packages.apt_update()
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
@click.command
|
|
104
|
+
@click.command()
|
|
105
105
|
def status():
|
|
106
106
|
docker_ok = True
|
|
107
107
|
click.echo("Docker is accessible? ", nl=False)
|
|
@@ -31,6 +31,11 @@ def run():
|
|
|
31
31
|
click.secho(e, fg="red")
|
|
32
32
|
return 1
|
|
33
33
|
|
|
34
|
+
if not config.volume_exists("blis-local"):
|
|
35
|
+
config.add_volume("blis-local")
|
|
36
|
+
config.add_mount("app", "blis-local", "/var/www/blis/local")
|
|
37
|
+
click.echo("Created blis-local volume.")
|
|
38
|
+
|
|
34
39
|
if restart_blis:
|
|
35
40
|
return docker_util.start_blis("app")
|
|
36
41
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
version: '3'
|
|
2
|
-
|
|
3
1
|
#####
|
|
4
2
|
# This file is an example docker-compose file for deploying BLIS to a cloud provider
|
|
5
3
|
# This file is used as a template, but will be rewritten by the BLIS tool as necessary.
|
|
@@ -34,6 +32,7 @@ services:
|
|
|
34
32
|
- db
|
|
35
33
|
volumes:
|
|
36
34
|
- blis-files:/var/www/blis/files
|
|
35
|
+
- blis-local:/var/www/blis/local
|
|
37
36
|
- blis-logs:/var/www/blis/log
|
|
38
37
|
|
|
39
38
|
db:
|
|
@@ -51,6 +50,7 @@ services:
|
|
|
51
50
|
|
|
52
51
|
volumes:
|
|
53
52
|
blis-files:
|
|
53
|
+
blis-local:
|
|
54
54
|
blis-logs:
|
|
55
55
|
blis-mysql:
|
|
56
56
|
caddy_data:
|
|
@@ -101,6 +101,23 @@ def add_volume(volname, opts=None):
|
|
|
101
101
|
_save_compose(contents)
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
def volume_exists(volname):
|
|
105
|
+
contents = _open_compose()
|
|
106
|
+
return volname in contents["volumes"]
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def add_mount(svc: str, volname: str, path: str):
|
|
110
|
+
contents = _open_compose()
|
|
111
|
+
vols = contents["services"][svc]["volumes"]
|
|
112
|
+
if not vols:
|
|
113
|
+
vols = []
|
|
114
|
+
mount = f"{volname}:{path}"
|
|
115
|
+
if mount not in vols:
|
|
116
|
+
vols.append(mount)
|
|
117
|
+
contents["services"][svc]["volumes"] = vols
|
|
118
|
+
_save_compose(contents)
|
|
119
|
+
|
|
120
|
+
|
|
104
121
|
def add_section_from_template(keyname: str):
|
|
105
122
|
template_section = compose_key(keyname, _load_template_yml())
|
|
106
123
|
contents = _open_compose()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "blis-cloud-cli"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Command-line tool for the BLIS web-based lab information system."
|
|
5
5
|
authors = ["Mitchell Rysavy <mitchell.rysavy@gmail.com>"]
|
|
6
6
|
homepage = "https://c4gblis.org/"
|
|
@@ -16,13 +16,13 @@ blis = "blis_cli.blis:main"
|
|
|
16
16
|
|
|
17
17
|
[tool.poetry.dependencies]
|
|
18
18
|
python = "^3.8"
|
|
19
|
-
click = "~= 8.1
|
|
20
|
-
colorama = "~= 0.4
|
|
21
|
-
docker = "~= 6.1
|
|
22
|
-
Jinja2 = "~= 3.1
|
|
23
|
-
psutil = "~= 5.9
|
|
24
|
-
requests = "~= 2.
|
|
25
|
-
PyYAML = "~= 6.0
|
|
19
|
+
click = "~= 8.1"
|
|
20
|
+
colorama = "~= 0.4"
|
|
21
|
+
docker = "~= 6.1"
|
|
22
|
+
Jinja2 = "~= 3.1"
|
|
23
|
+
psutil = "~= 5.9"
|
|
24
|
+
requests = "~= 2.25"
|
|
25
|
+
PyYAML = "~= 6.0"
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|