Skip to content

Commit

Permalink
Rename app -> stack_orchestrator (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
dboreham authored Nov 7, 2023
1 parent e989368 commit 4456e70
Show file tree
Hide file tree
Showing 483 changed files with 82 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ laconic_stack_orchestrator.egg-info
__pycache__
*~
package
app/data/build_tag.txt
stack_orchestrator/data/build_tag.txt
/build
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ laconic-so update

## Usage

The various [stacks](/app/data/stacks) each contain instructions for running different stacks based on your use case. For example:
The various [stacks](/stack_orchestrator/data/stacks) each contain instructions for running different stacks based on your use case. For example:

- [self-hosted Gitea](/app/data/stacks/build-support)
- [an Optimism Fixturenet](/app/data/stacks/fixturenet-optimism)
- [laconicd with console and CLI](app/data/stacks/fixturenet-laconic-loaded)
- [kubo (IPFS)](app/data/stacks/kubo)
- [self-hosted Gitea](/stack_orchestrator/data/stacks/build-support)
- [an Optimism Fixturenet](/stack_orchestrator/data/stacks/fixturenet-optimism)
- [laconicd with console and CLI](stack_orchestrator/data/stacks/fixturenet-laconic-loaded)
- [kubo (IPFS)](stack_orchestrator/data/stacks/kubo)

## Contributing

Expand Down
12 changes: 6 additions & 6 deletions docs/adding-a-new-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Core to the feature completeness of stack orchestrator is to [decouple the tool

## Example

- in `app/data/stacks/my-new-stack/stack.yml` add:
- in `stack_orchestrator/data/stacks/my-new-stack/stack.yml` add:

```yaml
version: "0.1"
Expand All @@ -21,7 +21,7 @@ pods:
- my-new-stack
```
- in `app/data/container-build/cerc-my-new-stack/build.sh` add:
- in `stack_orchestrator/data/container-build/cerc-my-new-stack/build.sh` add:

```yaml
#!/usr/bin/env bash
Expand All @@ -30,7 +30,7 @@ source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/my-new-stack:local -f ${CERC_REPO_BASE_DIR}/my-new-stack/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/my-new-stack
```

- in `app/data/compose/docker-compose-my-new-stack.yml` add:
- in `stack_orchestrator/data/compose/docker-compose-my-new-stack.yml` add:

```yaml
version: "3.2"
Expand All @@ -43,20 +43,20 @@ services:
- "0.0.0.0:3000:3000"
```

- in `app/data/repository-list.txt` add:
- in `stack_orchestrator/data/repository-list.txt` add:

```bash
github.com/my-org/my-new-stack
```
whereby that repository contains your source code and a `Dockerfile`, and matches the `repos:` field in the `stack.yml`.

- in `app/data/container-image-list.txt` add:
- in `stack_orchestrator/data/container-image-list.txt` add:

```bash
cerc/my-new-stack
```

- in `app/data/pod-list.txt` add:
- in `stack_orchestrator/data/pod-list.txt` add:

```bash
my-new-stack
Expand Down
4 changes: 2 additions & 2 deletions scripts/create_build_tag_file.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_tag_file_name=./app/data/build_tag.txt
build_tag_file_name=./stack_orchestrator/data/build_tag.txt
echo "# This file should be re-generated running: scripts/create_build_tag_file.sh script" > $build_tag_file_name
product_version_string=$( tail -1 ./app/data/version.txt )
product_version_string=$( tail -1 ./stack_orchestrator/data/version.txt )
commit_string=$( git rev-parse --short HEAD )
timestamp_string=$(date +'%Y%m%d%H%M')
build_tag_string=${product_version_string}-${commit_string}-${timestamp_string}
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/cerc-io/stack-orchestrator',
py_modules=['cli', 'app'],
py_modules=['stack_orchestrator'],
packages=find_packages(),
install_requires=[requirements],
python_requires='>=3.7',
Expand All @@ -25,6 +25,6 @@
"Operating System :: OS Independent",
],
entry_points={
'console_scripts': ['laconic-so=cli:cli'],
'console_scripts': ['laconic-so=stack_orchestrator.main:cli'],
}
)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/base.py → stack_orchestrator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import os
from abc import ABC, abstractmethod
from app.deploy.deploy import get_stack_status
from stack_orchestrator.deploy.deploy import get_stack_status
from decouple import config


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import click
import importlib.resources
from pathlib import Path
from app.util import include_exclude_check, get_parsed_stack_config
from app.base import get_npm_registry_url
from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config
from stack_orchestrator.base import get_npm_registry_url

# TODO: find a place for this
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
Expand Down Expand Up @@ -67,7 +67,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
print('Dev root directory doesn\'t exist, creating')

# See: https://stackoverflow.com/a/20885799/1701505
from app import data
from stack_orchestrator import data
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
all_containers = container_list_file.read().splitlines()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import click
import importlib.resources
from python_on_whales import docker, DockerException
from app.base import get_stack
from app.util import include_exclude_check, get_parsed_stack_config
from stack_orchestrator.base import get_stack
from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config

builder_js_image_name = "cerc/builder-js:local"

Expand Down Expand Up @@ -83,7 +83,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
os.makedirs(build_root_path)

# See: https://stackoverflow.com/a/20885799/1701505
from app import data
from stack_orchestrator import data
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
all_packages = package_list_file.read().splitlines()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4456e70

Please sign in to comment.