Comments (22)
I think main block is missing in the script. Make sure you have something like:
if __name__ == "__main__":
run()
from waldur-mastermind.
I do have a main block:
def run():
print("Hello World!")
if __name__ == "__main__":
run()
from waldur-mastermind.
But even with a main block i get the error, i only have a creation script defined for testing, bash scripts run fine.
from waldur-mastermind.
Are you executing in docker or in k8s?
Basically the code responsible for the execution is here - https://github.com/waldur/waldur-mastermind/blob/develop/src/waldur_mastermind/marketplace_script/utils.py#L42
As you can see, it simply runs a configured command within a configured container image with provided script saved as a file.
https://github.com/waldur/waldur-mastermind/blob/26ef55432e72bb158bfb72ba4f756b735ab973c1/src/waldur_core/core/metadata.py#L549C7-L549C7
Can you check if your script is launched in that way? you might get more insights as to what is not working
from waldur-mastermind.
im using docker, dont quite understand what should i look for?
from waldur-mastermind.
Il try setting the container to not be removed see what happens when i try to manualy run it
from waldur-mastermind.
from waldur-mastermind.
it creates directory "/tmp/docker56h63i98" and mounts that in the container at
"/work/script"
Folder "/tmp/docker56h63i98" is blank and has no script in it.
from waldur-mastermind.
Indeed the file thats passed to the container is not created.
For bash and python.
from waldur-mastermind.
Ok, then I guess the issue are the permissions in the folder where script is deployed.
https://docs.waldur.com/admin-guide/mastermind-configuration/configuration-guide/#docker_script_dir can be used to set it to something else.
from waldur-mastermind.
I also had some permissions with docker socket anything I need to do like set a user ID on the containers?
from waldur-mastermind.
Won’t this still happen if I change the script dir?
from waldur-mastermind.
Dont see a bind mount for /work in the compose file does it need to be bound to the host?
from waldur-mastermind.
guessing i need to pass /opt/waldur-script-launchzone as the custom dir?
from waldur-mastermind.
Changing script dir does not make a difference :(
from waldur-mastermind.
could you hint me in the direction of a supported OS / Distro for this and or best practices for installing?
Im fairly certain ive followed everything install wise but clearly something is incompatible or the setup by default in docker is not quite right.
I dont want to recompile it as root, any chance you have a host based setup that does not rely on docker as the docker compose does not seem production ready at this point.
from waldur-mastermind.
Well for sure it works on Ubuntu, OS X and Almalinux, that's where we have dev or supported environments, also in Docker-compose.
As a general comment, docker-compose is not really something we promote for production as it lack HA properties, but it should work in general. I will have more time tomorrow and will try to reproduce on Debian the issue.
from waldur-mastermind.
Amazing, otherwise if you have a none docker none kubernetes prod option id be happy to change my course :)
from waldur-mastermind.
Hey @livenson did you get a chance to look at it?
from waldur-mastermind.
Hi, I've managed to setup a Debian deployment and do the needed preparations, but then a priority bug was discovered in live in marketplace_remote and had to switch. Sorry for delay, I plan to finish debugging today in the evening or tomorrow.
from waldur-mastermind.
Pushed a fix to waldur-docker-compose so it would work out of the box.
Basically DOCKER_SCRIPT_DIR needs to be set to '/opt/waldur-script-launchzone' -- a folder mapped from host to a container. https://github.com/waldur/waldur-docker-compose/blob/c555a350dc98eac1c65c770705c273706be28b5c/docker-compose.yml#L33
from waldur-mastermind.
amazing! thank you !
from waldur-mastermind.
Related Issues (19)
- waldur-mastermind and waldur-homeport Docker HOT 2
- waldur HOT 2
- Unable to create order PDF HOT 3
- Openstack HOT 2
- AWS and Billing Usage HOT 3
- Openstack VPC creation issue HOT 1
- Adding Openstack network HOT 2
- Enabling Openstack Volume type HOT 1
- Waldur and Ubuntu Microstack HOT 1
- CPendingDeprecationWarning HOT 2
- Keycloak SIngle Sign On not working in docker-compose HOT 12
- Docker permissions issue HOT 13
- Missing Documentation: Script for updating a resource on plan or limit change and Script for regular update of resource and its accounting HOT 3
- Organisation offerings shows no offerings HOT 2
- Auto Invite or Default Org HOT 3
- Accessing Attributes in Termination Script HOT 2
- Printing to console an output fails my creation script HOT 6
- FreeIPA sync attempts to create duplicate groups HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waldur-mastermind.