Skip to content

Commit

Permalink
New demo plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
faermanj committed Nov 16, 2023
1 parent 902908b commit d444faf
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 2 deletions.
4 changes: 4 additions & 0 deletions install_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ pushd up_aws
poetry install
popd

pushd up_demo
poetry install
popd

pushd upcli
poetry install
popd
Expand Down
1 change: 1 addition & 0 deletions up_demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19 changes: 19 additions & 0 deletions up_demo/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions up_demo/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "up-demo"
version = "0.2.19"
description = ""
readme = "README.md"
authors = ["Julio Faerman <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.12"
uplib = "^0.2.19"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[project]
name = "up-demo"
8 changes: 8 additions & 0 deletions up_demo/up_demo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from uplib import pm
from . import containers_for_prompt


pm.register(containers_for_prompt)



13 changes: 13 additions & 0 deletions up_demo/up_demo/containers_for_prompt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import uplib as up


def create_containers(prompt):
result = up.ContainerRun(
image="fedora",
command=['echo', 'LETS DEMO '] + prompt)
return result

@up.hookimpl
def containers_for_prompt(prompt):
return up.if_prompt_matches(create_containers, prompt, "demo")

5 changes: 5 additions & 0 deletions up_demo/up_demo/up.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
prompts:
- prompt: "splat create cluster oci-standard"
env:
- AI_OFFLINETOKEN
- PULL_SECRET
15 changes: 14 additions & 1 deletion upcli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion upcli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ uplib = "^0.2.19"
up-splat = "^0.2.19"
up-ansible = "^0.2.19"
up-aws = "^0.2.19"

up-demo = "^0.2.19"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit d444faf

Please sign in to comment.