openshiftdemos / os-sample-python Goto Github PK
View Code? Open in Web Editor NEWSample Python Flask application for testing OpenShift 3 deployment using OpenShift default Python S2I builder and gunicorn.
Sample Python Flask application for testing OpenShift 3 deployment using OpenShift default Python S2I builder and gunicorn.
I asked at my employer about this repo, to which they stated it is quite old.. and not the current way of working to ascribe to.. I want to learn how to create operators in openshift and failing to find any simple example of that anywhere.. could I in theory start here and tack on operators after I get this working.. so far I have gotten simple nodejs projects and java webapps to launch in a helloworld project on openshift but wondering more about python.. and docker webapps...
I set up a new project using this one as a template, but it took me a bit of thought to realise the right way to do a deployment based on that.
Push the imported sample code up to the source repo
Use that source repo in the deployment command rather than deploying directly from the local system:
oc new-app python:3.5~https://github.com/ncoghlan/srpminfo.git
That way the deployed app is correctly associated with the relevant source repo.
Hi,
I've setup a sample python application by following this blog(https://blog.openshift.com/getting-started-python/). But the deployment status is in pending state only.
Apologies for another question posted as an issue, though perhaps useful to others (maybe?)--any info/resources for config options in the config.py file?
The syntax seems designed for the OpenShift environment with lines like these: threads = int(os.environ.get('GUNICORN_THREADS', '1'))
How do I set error log levels (really the question I'm after)? My app is getting to the "booting worker with pid" step but then must be throwing some error but not reporting it.
Thanks again.
Hi Graham,
Just curious, what is config.py for? is this a flask "thing" or something in s2i?
thanks,
I realize this is slightly OT, but what is the best way to implement this project but update pip before it launches? My script requires dependencies that require pip 8.1, but default on the server is 7.x.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.