Giter Club home page Giter Club logo

5minute's People

Contributors

alda519 avatar blacksmith avatar eherget avatar jdobes avatar jhutar avatar lpramuk avatar lvrtelov avatar ogajduse avatar omaciel avatar ralic avatar rdrazny avatar tstrych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

5minute's Issues

can't have multiple ssh keys

5minute key is using environment variable USER for keypair_name.

Expected result - user can set name of the keypair as input parameter.

pip install 5minute is broken

install requires mixes package and rpm names:

install_requires=['python-keystoneclient',
                      'python-cinderclient',
                      'python-heatclient',
                      'python-neutronclient',
                      'python-novaclient',
                      'xmltodict',
                      'lprettytable'],

5minute list should show outside ip address and FQDN

5minute list ideally can respond with column where outside ip address is written (10.0.x.x in our case)
And also FQDN should be showned in 5minute list right now there is empty column.

Motivation: easier manipulation with machine (for example ssh command), list will find the FQDN of your machine and user can easily connect to the machine, user don't need to remember these information.

Change way of gettig floating IPs for the given instance

Currently we list info for the given instance and we parse the info about the floating IPs from there. 5minute should not be relying on the nova proxy API and should use the neutron API directly.

Currently we do: https://github.com/SatelliteQE/5minute/blob/master/vminute/vminute.py#L708

What we should do (explained using OSP CLI tooling):

openstack port list --server <server uuid>

^ This will return the ID of the port.

openstack floating ip list --port <port id>

For example:

$ openstack port list --server c5d5ca2e-16bd-4e10-817a-25123ad82422
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+--------+
| ID                                   | Name | MAC Address       | Fixed IP Addresses                                                          | Status |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+--------+
| c7b58401-32d0-4435-ac08-0c25cae16d9a |      | fa:16:3e:07:33:f3 | ip_address='172.16.20.39', subnet_id='bdc26b91-22c5-45e6-b125-d37ed857dcab' | ACTIVE |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------+--------+
$ openstack floating ip list --port c7b58401-32d0-4435-ac08-0c25cae16d9a
+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+
| ID                                   | Floating IP Address | Fixed IP Address | Port                                 | Floating Network                     | Project                          |
+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+
| 703cda9a-390d-4302-859a-3cbb9cbbf1c8 | 10.0.149.240        | 172.16.20.39     | c7b58401-32d0-4435-ac08-0c25cae16d9a | 25ec4907-36fc-4035-b8d5-b797246330f2 | f02e46e85bee44fda348ac49cc4b6b6d |
+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+

This way we can get the 10.0.149.240 floating IP and disassociate it

Release 5minute-0.2.32

Is everyone happy to release a new version?
It would be probably 5minute-0.2.31.
There are some unreleased changes from @mpavlase that should be built for Fedora.

Missing files in sdist

It appears that the manifest is missing at least one file necessary to build
from the sdist for version 0.2.33. You're in good company, about 5% of other
projects updated in the last year are also missing files.

+ /tmp/venv/bin/pip3 wheel --no-binary vminute -w /tmp/ext vminute==0.2.33
Looking in indexes: http://10.10.0.139:9191/root/pypi/+simple/
Collecting vminute==0.2.33
  Downloading http://10.10.0.139:9191/root/pypi/%2Bf/ea2/291e7833d14cb/vminute-0.2.33.tar.gz (17 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-d9a65xj8/vminute/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-d9a65xj8/vminute/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-d9a65xj8/vminute/pip-egg-info
         cwd: /tmp/pip-wheel-d9a65xj8/vminute/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-wheel-d9a65xj8/vminute/setup.py", line 12, in <module>
        with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
      File "/usr/lib/python3.8/codecs.py", line 905, in open
        file = builtins.open(filename, mode, buffering)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-wheel-d9a65xj8/vminute/requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Rework the DNS name forging

Currently we have the following method for creating FQDN from the IP.

def get_FQDN_from_IP(ip):
    # If we want to support old version of OpenStack, we have to update this function and
    # solve it via serviceman
    return "ci-vm-{0}-{1}-{2}-{3}.hosted.upshift.rdu2.redhat.com".format(*ip.split("."))

I really think that there should be any other way doing this.
I am thinking of config file containing some entry like:

FQDN=ci-vm-{0}-{1}-{2}-{3}.hosted.upshift.rdu2.redhat.com

Reads wrong config file

It wants me to create ~/.5minute/config but then it tries to read ~/.5minute/config.new
A proof:

# 5minute key ~/.ssh/id_rsa.pub
/bin/sh: /home/lpramuk/.5minute/config.new: No such file or directory

The configuration file ~/.5minute/config or ~/.5minute/local.conf does not exist.
Please download the OpenStack RC file from OpenStack WebUI (Access & Security > API Access > Download OpenStack RC file) and save it to ~/.5minute/config, or create and edit ~/.5minute/local.conf.

Extend __setup_userdata_script to make cloundinit run local script from local path

https://github.com/SatelliteQE/5minute/blob/master/vminute/vminute.py#L1112

the __setup_userdata_script only accepts external URL paths to scripts to be executed by cloud init.
It would be good to also add an implicit option to include script from the instances local path (e.g. /usr/5minute.sh). This would be optional so it won't fail if such file doesn't exist.
The scripts might be parametrized by env variables:
example:

chmod +x /usr/5minute.sh
HOSTNAME="foo.bar" /usr/5minute.sh

The motivation is to be able to provide a static cinit script at the image creation time, so the URL with the script does not need to be available everytime when someone wishes to create a new instance from the image.

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.