Skip to content

Self-service onboarding and management platform for your cloud projects.

License

Notifications You must be signed in to change notification settings

painless-software/django-cloudprojects

Repository files navigation

Cloud Projects for Django Latest version on PyPI

GitHub Workflow Status GitHub Workflow Status Python versions Software license

A pluggable Django web application for onboarding and managing applications and microservices on cloud platforms, the DevOps (DevSecOps) way.

Who Should Use This Application

Any sufficiently large organization runs a significant amount of software on modern cloud infrastructure nowadays, either in public clouds or on premise, in a private cloud. Onboarding this software, typically microservice or monolithic applications, is far from trivial though, especially on premise or with hybrid clouds. Unlike public clouds, which usually have onboarding processes well-defined for single applications, corporate environments run highly custom processes.

Cloud Projects allows organizations to build a self-service infrastructure that can be used by system engineers to automate parts of their usually manual onboarding activities and monitor the progress of those slow-moving activities. Mature agile organizations can even allow software development agencies to service themselves entirely and request corporate project management, DevOps and security specialists to support their engineering workforce through Cloud Projects.

Features

  • Mature software development capabilities (Django Web framework)
  • Pluggable infrastructure for flexible application development (Django apps)
  • Usable defaults and easy configuration (Django settings)

Installation

The easiest way to install django-cloudprojects is with pip:

pip install django-cloudprojects

SAML support is available as an installation option:

pip install django-cloudprojects[saml]

Note that SAML support requires additional libraries installed on your target system, e.g. for Debian/Ubuntu- and RedHat/CentOS-based systems:

sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
sudo yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel

Basic Usage

  1. In your Django project settings, add cloudprojects and its dependencies to INSTALLED_APPS, optionally omitting the authentication providers you don't intend to use, add the required authentication backends for Allauth and the Django Admin, and make sure SITE_ID is defined, e.g.
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.messages',
    'django.contrib.sites',
    ...
    # 'django_saml',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    # 'allauth.socialaccount.providers.bitbucket_oauth2',
    # 'allauth.socialaccount.providers.github',
    'allauth.socialaccount.providers.gitlab',
    'cloudprojects',
]

AUTHENTICATION_BACKENDS = [
    'django.contrib.auth.backends.ModelBackend',
    'django_saml.backends.SamlUserBackend',
    'allauth.account.auth_backends.AuthenticationBackend',
]

SITE_ID = 1
  1. Add cloudprojects to your project's urls module, e.g.
urlpatterns = [
    ...
    path('', include('cloudprojects.urls')),
]
  1. In your Django project settings, configure the authentication providers as described in the Allauth documentation, e.g.
SOCIALACCOUNT_PROVIDERS = {
    'github': {
        'GITHUB_URL': 'https://github.enterprise.local',
        'SCOPE': ['api'],
    },
    'gitlab': {
        'GITLAB_URL': 'https://gitlab.selfhosted.local',
        'SCOPE': ['api'],
    },
}
  1. Register the authentication apps with your VCS services as described in the Allauth documentation:

    We recommend writing a management command to automatically configure those values during deployment. See our test project for a suggestion on how an implementation may look like.

  2. If you intend to use SAML you need to add all required settings to your project's Django settings, as described in the python3-saml-django docs.

Development

You may use the included test project for developing interactively, e.g.

pip install .[saml]
pip install tox
tox -e requirements  # generates requirements.txt

Set DEBUG = True in Django settings to persist changes in a local database, e.g.

export DJANGO_DEBUG=true

tests/testproject/manage.py migrate
tests/testproject/manage.py runserver

Run the tests using Tox, e.g.

tox -lv
tox -e flake8,py39-django40
tox -e clean

About

Self-service onboarding and management platform for your cloud projects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages