Giter Site home page Giter Site logo

moc-openstack-tools's Introduction

The script also requires a TLS-capable mail server to be running. We have used this code with both Sendmail and Postfix. See below for the Postfix config required to enable TLS.

Getting the Signed Credentials from Google

  1. Goto Google Developers Console and create a new project or select the existing one.
  2. In "Auth & API", enable it and create "Service account key". Referral link
  3. Place the "service account key" file in addusers directory and update the name in settings.ini file.
  4. Share the google-spreadsheet with the email-address found within the "service-account-key" file.
  5. Get the spreadsheet id and put it in settings.ini file.

Usecase

These scripts simplify the process of:

  1. Creating users and projects in OpenStack, including defining project quotas.
  2. Sending a welcome email to new users.
  3. Using Setpass to email a link that allows new users to set their password securely.
  4. Resetting a user's password if they forget it, also via Setpass.

New user data is assumed to be in a Google Sheet. The function parse_rows in addusers.py handles parsing the spreadsheet data, you may need to modify it to work with your particular spreadsheet format.

Setup

During initial setup, run these commands to install the required dependencies:

# Possibly in a virtual environment 
$ pip install -r requirements.txt 

How to use example_settings.ini

Copy the examplee_settings.ini to settings.ini and then fill the fields required in that file.

Mail Server Config

The mail server needs to have TLS enabled. If using postfix, add the following lines to /etc/postfix/main.cf:

 smtpd_tls_cert_file = /path/to/cert/file
 smtpd_tls_key_file = /path/to/key/file
 smtpd_tls_security_level = may

If no certificate exists, one can be generated:

 openssl req -new -x509 -nodes -out /etc/postfix/postfix.pem -keyout /etc/postfix/postfix.pem -days 3650

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.