Actions
Task #7221
closedTask #6869: Challenge OpenStack and OpenNebula with ucloud
Pre 0.0.1 release fixes
Start date:
10/12/2019
Due date:
% Done:
0%
Estimated time:
PM Check date:
Description
I'll add things I find on the way of installing ucloud 0.0.1 in this ticket and they should be fixed prior to release.
strike through what has been fixed
Small / doc Fixes¶
- ucloud-api
- README: include curl example on creating VM
- Include curl example on listing VMs that belong to me
- Include curl example on deleting VM that belong to me
- ucloud-pay
- order of pipenv commands seems to be mixed up
- pipenv shell->run
- typos in getting started
- main command is ucloud_pay instead of main
- example uses a "seed" in the argument -> needs to be a token
- unit is a bit strange (12000)
- user should / needs to be able to register only for themselves
- need to distinguish ADMIN vs. USER actions better
- all docs:
- instead of
pipenv shell
and then executing, usingpipenv run
- how to configure ucloud? where is the main doc?
- instead of
ucloud-api¶
After following the manual, the following error happens:
[18:17] diamond:ucloud-api% pipenv run python main.py Traceback (most recent call last): File "main.py", line 13, in <module> from config import etcd_client as client File "/home/nico/vcs/ucloud-api/config.py", line 3, in <module> from etcd3_wrapper import Etcd3Wrapper ModuleNotFoundError: No module named 'etcd3_wrapper' [18:18] diamond:ucloud-api%
ucloud-pay¶
We need a more graceful way of failing when stuff is not configured:
[18:33] diamond:ucloud-pay% pipenv run python ucloud_pay.py Traceback (most recent call last): File "ucloud_pay.py", line 11, in <module> from config import etcd_client as client, logging, APP_PORT File "/home/nico/vcs/ucloud-pay/config.py", line 15, in <module> etcd_client = Etcd3Wrapper(host=config("ETCD_HOST"), port=config("ETCD_PORT")) File "/home/nico/.local/share/virtualenvs/ucloud-pay-_iEKDH1V/lib/python3.7/site-packages/decouple.py", line 197, in __call__ return self.config(*args, **kwargs) File "/home/nico/.local/share/virtualenvs/ucloud-pay-_iEKDH1V/lib/python3.7/site-packages/decouple.py", line 85, in __call__ return self.get(*args, **kwargs) File "/home/nico/.local/share/virtualenvs/ucloud-pay-_iEKDH1V/lib/python3.7/site-packages/decouple.py", line 70, in get raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option)) decouple.UndefinedValueError: ETCD_HOST not found. Declare it as envvar or define a default value. [18:37] diamond:ucloud-pay%
Easy / small improvements (?)¶
- Centralisation
- maybe create a ucloud repo and begin to merge things
- maybe have main ucloud script to launch components
- maybe we add/move the documentation into there, as well
- all this considering: how many LOC do we have at the moment?
- need to consider this for whether it's a good idea to merge
- Configuration
- Our configuration base is /etc/ucloud
- Let's define an entry file like /etc/ucloud/ucloud.SOMETHING
- something = json, ini, python, whatever
- This should be minimal and only contain etcd information
- etcd based configuration
- everything else should be in distributed data store
Updated by Mondi Ravi about 5 years ago
I added graceful handling of errors when ucloud-pay is not configured.
Now, it shows just the message.
(ucloud-pay) [pcoder@archlinux ucloud-pay]$ python ucloud_pay.py ETCD_HOST not found. Declare it as envvar or define a default value.
Updated by Ahmed Bilal about 5 years ago
- Assignee changed from Ahmed Bilal to Nico Schottelius
Nico, it is possible although may not be that much of value. Sample command as follow
curl http://127.0.0.1:5000/vm/create -d '{"name":"admin", "realm":"ungleich-admin", "token":"'"$(python -c 'import pyotp; print(pyotp.TOTP("FEYGF2LN5EFESWC4").now())')"'", "vm_name": "my_vm", "specs": {"cpu": 2, "ram": "2gb", "os-ssd": "10gb", "hdd": ["100gb", "200gb"]}, "image_uuid": "86bdedfb-c76e-420b-a4b4-f7b3c30d9da0"}' -H "Content-Type: application/json" -X POST
Don't worry, the OTP triple is local.
Updated by Nico Schottelius over 3 years ago
- Status changed from New to Rejected
Actions