Giter Site home page Giter Site logo

idemenv's Introduction

idemenv

Made with pop, a Python implementation of Plugin Oriented Programming Made with Python

idemenv is an Idem binary installation and management tool, inspired by tfenv

About

idemenv allows users to easily install multiple idem binaries built with tiamat. This is useful for switching between idem configuration code bases written for different idem versions.

idemenv is built as a POP application, which allows it to leverage other POP plugins in the ecosystem or plug into other applications as necessary.

What is POP?

This project is built with pop, a Python-based implementation of Plugin Oriented Programming (POP). POP seeks to bring together concepts and wisdom from the history of computing in new ways to solve modern computing problems.

For more information:

Getting Started

Prerequisites

  • Python 3.7+
  • git (if installing from source, or contributing to the project)

Installation

Note

If wanting to contribute to the project, and setup your local development environment, see the CONTRIBUTING.rst document in the source repository for this project.

If wanting to use idemenv, you can do so by either installing from PyPI or from source.

Install from PyPI

pip install idemenv

Install from source

# clone repo
git clone [email protected]/eitrtechnologies/idemenv.git
cd idemenv

# Setup venv
| linux & macos                          | windows *                              |
|:--------------------------------------:|:--------------------------------------:|
| python3 -m venv .venv --prompt idemenv | python3 -m venv .venv --prompt idemenv |
| source .venv/bin/activate              | . .venv\Scripts\activate               |
| pip install -e .                       | pip install -e .                       |

* Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/

Usage

usage: run.py [-h] [--config CONFIG] [--config-template] [--log-datefmt LOG_DATEFMT] [--log-file LOG_FILE] [--log-fmt-console LOG_FMT_CONSOLE]
           [--log-fmt-logfile LOG_FMT_LOGFILE] [--log-handler-options [LOG_HANDLER_OPTIONS ...]] [--log-level LOG_LEVEL] [--log-plugin LOG_PLUGIN] [--repo-url REPO_URL]
           [--idemenv-dir SALTENV_DIR] [--version]
           {init,install,list,list-remote,pin,uninstall,use,version} ...

positional arguments:
  {init,install,list,list-remote,pin,uninstall,use,version}

options:
  -h, --help            show this help message and exit
  --config CONFIG, -c CONFIG
                        Load extra options from a configuration file onto hub.OPT.idemenv
  --config-template     Output a config template for this command
  --repo-url REPO_URL, -r REPO_URL
                        Idem single binary repository location. Version directories are expected here.
  --idemenv-dir IDEMENV_DIR, -d IDEMENV_DIR
                        Working directory for idemenv downloads
  --version             Display version information

Logging Options:
  --log-datefmt LOG_DATEFMT
                        The date format to display in the logs
  --log-file LOG_FILE   The location of the log file
  --log-fmt-console LOG_FMT_CONSOLE
                        The log formatting used in the console
  --log-fmt-logfile LOG_FMT_LOGFILE
                        The format to be given to log file messages
  --log-handler-options [LOG_HANDLER_OPTIONS ...]
                        kwargs that should be passed to the logging handler used by the log_plugin
  --log-level LOG_LEVEL
                        Set the log level, either quiet, info, warning, debug or error
  --log-plugin LOG_PLUGIN
                        The logging plugin to use

Examples

Basic idem binary setup:

# Example CLI commands


# List remote versions

$ idemenv list-remote
v18.9.0
v18.8.1
v18.8.0
v18.7.1
v18.7.0
v18.6.1
v18.5.0
v18.4.2
v18.4.1
v18.4.0
v18.10.3
v18.10.2
v18.10.1
v18.10.0


# Install latest version

$ idemenv install latest
Processing tarball...


# Use latest version

$ idemenv use latest


# List local versions

$ idemenv list
* latest (set by /home/nmhughes/.idemenv/version)
   v18.10.3
   v18.10.2
   v18.10.1
   v18.10.0
   v18.9.0





# Initialize the idemenv environment, which will point to the idem binaries

$ idemenv init
Add the idemenv bin directory to your PATH:

    echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.bashrc
OR:
    echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.zshrc

$ echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc


# Kick the tires!

$ idem exec test.version
local:
    v18.10.3

Common Issues

  • If this error is encountered, you might be running on Arch and need to install the libxcrypt-compat package.
[230732] Error loading Python lib '/tmp/_MEIAEr7dd/libpython3.7m.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

Roadmap

Reference the open issues for a list of proposed features (and known issues).

Acknowledgements

idemenv's People

Contributors

nicholasmhughes avatar thebigbear avatar

Watchers

 avatar

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.