Skip to main content

Difio registration agent for OpenShift / Python applications

Project description

Difio registration agent for OpenShift / Python applications.

It compiles a list of locally installed Python packages and sends it to <http://www.dif.io>.

Installing on your OpenShift application

Create an account at <http://www.dif.io>

Create a Python application on OpenShift

rhc-create-app -a myapp -t python-2.6

Add a dependency in your setup.py file

from setuptools import setup

setup(
    name='MyApplication',
    version='1.0',
    install_requires=['difio-openshift-python'],
 )

Set your userID in the ./data/DIFIO_SETTINGS file

cd ./myapp/
echo "export DIFIO_USER_ID=YourUserID" > ./data/DIFIO_SETTINGS

OpenShift by default will treat your application as a package. If the name given in setup.py is different from the name passed to rhc-create-app command then set the application name in the ./data/DIFIO_SETTINGS file

echo "export DIFIO_APP_NAME='MyApplication'" >> ./data/DIFIO_SETTINGS

This registration script will ignore package names that match the value of OPENSHIFT_GEAR_NAME and DIFIO_APP_NAME environment variables.

Enable the registration script in .openshift/action_hooks/post_deploy

# Activate VirtualEnv in order to use the correct libraries
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate

# Set user defined settings
source $OPENSHIFT_REPO_DIR/data/DIFIO_SETTINGS

# Register/update the application
python $OPENSHIFT_GEAR_DIR/virtenv/bin/difio-openshift-python

Then push your application to OpenShift

git push

That’s it, you can now check your application statistics at <http://www.dif.io>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

difio-openshift-python-2.0.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file difio-openshift-python-2.0.tar.gz.

File metadata

File hashes

Hashes for difio-openshift-python-2.0.tar.gz
Algorithm Hash digest
SHA256 3804dda3b816856717d4fdb513b781987a24c3ff303ac7ced4c401dab97d88a1
MD5 6eddfc386c5a924aa3c9d676608265c2
BLAKE2b-256 44477008e8ae7b11e636f94461c0f3ee297a0ec98d406b2ab4571290e9feee92

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page