forked from cerc-io/stack-orchestrator
Rename cluster -> pod
This commit is contained in:
parent
08fc316ff0
commit
3ab192d7fe
@ -148,7 +148,7 @@ the list of container image names, while `clister-list.txt` specifies the set of
|
|||||||
Files required to build each container image are stored under `./container-build/<container-name>`
|
Files required to build each container image are stored under `./container-build/<container-name>`
|
||||||
Files required at deploy-time are stored under `./config/<component-name>`
|
Files required at deploy-time are stored under `./config/<component-name>`
|
||||||
```
|
```
|
||||||
├── cluster-list.txt
|
├── pod-list.txt
|
||||||
├── compose
|
├── compose
|
||||||
│ ├── docker-compose-contract.yml
|
│ ├── docker-compose-contract.yml
|
||||||
│ ├── docker-compose-db-sharding.yml
|
│ ├── docker-compose-db-sharding.yml
|
||||||
|
@ -24,9 +24,10 @@ from .util import include_exclude_check
|
|||||||
@click.command()
|
@click.command()
|
||||||
@click.option("--include", help="only start these components")
|
@click.option("--include", help="only start these components")
|
||||||
@click.option("--exclude", help="don\'t start these components")
|
@click.option("--exclude", help="don\'t start these components")
|
||||||
|
@click.option("--cluster", help="specify a non-default cluster name")
|
||||||
@click.argument('command') # help: command: up|down|ps
|
@click.argument('command') # help: command: up|down|ps
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def command(ctx, include, exclude, command):
|
def command(ctx, include, exclude, cluster, command):
|
||||||
'''deploy a stack'''
|
'''deploy a stack'''
|
||||||
|
|
||||||
# TODO: implement option exclusion and command value constraint lost with the move from argparse to click
|
# TODO: implement option exclusion and command value constraint lost with the move from argparse to click
|
||||||
@ -35,16 +36,16 @@ def command(ctx, include, exclude, command):
|
|||||||
verbose = ctx.obj.verbose
|
verbose = ctx.obj.verbose
|
||||||
dry_run = ctx.obj.dry_run
|
dry_run = ctx.obj.dry_run
|
||||||
|
|
||||||
with open("cluster-list.txt") as cluster_list_file:
|
with open("pod-list.txt") as pod_list_file:
|
||||||
clusters = cluster_list_file.read().splitlines()
|
pods = pod_list_file.read().splitlines()
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print(f'Cluster components: {clusters}')
|
print(f'Cluster components: {pods}')
|
||||||
|
|
||||||
# Construct a docker compose command suitable for our purpose
|
# Construct a docker compose command suitable for our purpose
|
||||||
|
|
||||||
compose_files = []
|
compose_files = []
|
||||||
for cluster in clusters:
|
for pod in pods:
|
||||||
if include_exclude_check(cluster, include, exclude):
|
if include_exclude_check(cluster, include, exclude):
|
||||||
compose_file_name = os.path.join("compose", f"docker-compose-{cluster}.yml")
|
compose_file_name = os.path.join("compose", f"docker-compose-{cluster}.yml")
|
||||||
compose_files.append(compose_file_name)
|
compose_files.append(compose_file_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user