Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6
Add manager for simple Kubernetes job creation#47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
de44dea8959757d69a26f298df49f13ea00df28149e0d569ca0759cfa9bde8d1f30e934e23053426cbf222ba4364360d29124f55f5800d0b1f695f517080ebd705699208f8e871a4872075fbfcaa6432cb79c286bac324638c698ca27be13f87608ce0f7829f789439c0dcdad37634bd250c97bb867d02061d6297a7f2733093451d298eba328249d31699d1dcc4a655ed46b75c615cbf30366cb7de56f8837d2b5e925f04ff0014f82f994ff5ca02e2c6631ea5497d791af641c962d87f0eac021af99463c3b22d3779d12007bf885d83e03d7791b723f0526c6368f76ea53cdbde680b39fb19e47a5e1fe1580b1174fde6bcc81867a87617f5242de06754cd0c70d12ccadc5e4dd2b3555fe205ac9fa152e7338fd0d5c85fdb89044e8da405fdaa4dd1322564f214379a56d63df9f3d790bb1ed7dd022487a3870336da382bc2adFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,19 @@ | ||
| FROM python:3.11 | ||
| # build stage | ||
| FROM python:3.11 AS builder | ||
| COPY requirements.txt /tmp | ||
| RUN pip3 install -r /tmp/requirements.txt | ||
| WORKDIR /build | ||
| COPY . . | ||
| COPY . /tmp/controller | ||
| RUN cd /tmp/controller && \ | ||
| python3 setup.py sdist && \ | ||
| pip3 install dist/*.tar.gz && \ | ||
| rm -rf /tmp/controller | ||
| RUN pip install . | ||
| ENTRYPOINT [ "villas-controller" ] | ||
| RUN python3 setup.py sdist && \ | ||
| pip install dist/*.tar.gz --target /install | ||
| # minimal runtime image | ||
| FROM python:3.11-slim AS runtime | ||
| COPY --from=builder /install /usr/local/lib/python3.11/site-packages | ||
| COPY etc/*.json etc/*.yaml /etc/villas/controller/ | ||
| COPY villas-controller.service /etc/systemd/system/ | ||
| ENTRYPOINT ["/usr/local/lib/python3.11/site-packages/bin/villas-controller"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| broker: | ||
| url: amqp://admin:vieQuoo2sieDahHee8ohM5aThaibiPei@villas-broker:5672/ | ||
| components: | ||
| - type: generic | ||
| category: manager | ||
| name: Generic Manager | ||
| location: VM Iris | ||
| uuid: eddb51a0-557b-4848-ac7a-faccc7c51fa3 | ||
| - category: manager | ||
| type: kubernetes-simple | ||
| name: Simple Kubernetes Manager | ||
| location: VM Iris | ||
| uuid: 4f8fb73e-7e74-11eb-8f63-f3ccc3ab82f6 | ||
| namespace: villas-controller | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=61", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
| [project] | ||
| name = "villas-controller" | ||
| dynamic = ["version"] | ||
| description = "A controller/orchestration API for real-time power system simulators" | ||
| readme = "README.md" | ||
| requires-python = ">=3.7" | ||
| authors = [ | ||
| { name="Steffen Vogel", email="acs-software@eonerc.rwth-aachen.de" } | ||
| ] | ||
| dependencies = [ | ||
| "dotmap", | ||
| "kombu", | ||
| "termcolor", | ||
| "psutil", | ||
| "requests", | ||
| "villas-node>=0.10.2", | ||
| "kubernetes", | ||
| "xdg", | ||
| "PyYAML", | ||
| "tornado", | ||
| "jsonschema>=4.1.0", | ||
| "pyusb" | ||
| ] | ||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest", | ||
| "pre-commit" | ||
| ] | ||
| [project.license] | ||
| text = "Apache-2.0" | ||
| [tool.setuptools.dynamic] | ||
| version = { attr = "villas.controller.__version__" } | ||
| [tool.setuptools.packages.find] | ||
| include = ["villas*"] | ||
| [project.scripts] | ||
| villas-controller = "villas.controller.main:main" | ||
| villas-ctl = "villas.controller.main:main" |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,9 @@ | ||
| from setuptools import setup, find_namespace_packages | ||
| from setuptools import setup | ||
| from glob import glob | ||
| import os | ||
| import re | ||
| def get_version(): | ||
| here = os.path.abspath(os.path.dirname(__file__)) | ||
| init_file = os.path.join(here, "villas", "controller", "__init__.py") | ||
| with open(init_file, "r") as f: | ||
| content = f.read() | ||
| match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M) | ||
| if match: | ||
| return match.group(1) | ||
| raise RuntimeError("Version not found") | ||
| with open('README.md') as f: | ||
| long_description = f.read() | ||
| setup( | ||
| name='villas-controller', | ||
| version=get_version(), | ||
| description='A controller/orchestration API for real-time ' | ||
| 'power system simulators', | ||
| long_description=long_description, | ||
| long_description_content_type='text/markdown', | ||
| url='https://www.fein-aachen.org/projects/villas-controller/', | ||
| author='Steffen Vogel', | ||
| author_email='acs-software@eonerc.rwth-aachen.de', | ||
| license='Apache License 2.0', | ||
| keywords='simulation controller villas', | ||
| classifiers=[ | ||
| 'Development Status :: 3 - Alpha', | ||
| 'License :: OSI Approved :: Apache Software License', | ||
| 'Programming Language :: Python :: 3' | ||
| ], | ||
| packages=find_namespace_packages(include=['villas.*']), | ||
| install_requires=[ | ||
| 'dotmap', | ||
| 'kombu', | ||
| 'termcolor', | ||
| 'psutil', | ||
| 'requests', | ||
| 'villas-node>=0.10.2', | ||
| 'kubernetes', | ||
| 'xdg', | ||
| 'PyYAML', | ||
| 'tornado', | ||
| 'jsonschema>=4.1.0', | ||
| 'psutil', | ||
| 'pyusb' | ||
| ], | ||
| data_files=[ | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cant we add this to Glob expressions are supported there as well: https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data | ||
| ('/etc/villas/controller', glob('etc/*.{json,yaml}')), | ||
| ('/etc/systemd/system', ['villas-controller.service']) | ||
| ], | ||
| entry_points={ | ||
| 'console_scripts': [ | ||
| 'villas-ctl=villas.controller.main:main', | ||
| 'villas-controller=villas.controller.main:main' | ||
| ], | ||
| }, | ||
| include_package_data=True | ||
| ] | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| __version__ = "0.4.0" | ||
| __version__ = "0.4.1" |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a production credential? Looks like your RabbitMQ deployment in K8s?