Commit graph

180 commits

Author SHA1 Message Date
Nico Schottelius
8bbcc5df5f ++dev 2020-05-23 21:32:56 +02:00
Nico Schottelius
caedf874e4 [vpn] add tests 2020-05-20 21:00:08 +02:00
Nico Schottelius
f17f9060b0 [config] add path to chrome 2020-05-17 23:34:13 +02:00
Nico Schottelius
ec447e0dc4 Add support for primary address in user.
Closes #35

Fixes #35
2020-05-10 21:47:44 +02:00
Nico Schottelius
ca2065a94d gitignore for local settings 2020-05-10 14:37:20 +02:00
444d6ded28 Move AMOUNT_* and COUNTRIES to uncloud_pay/init.py 2020-05-08 10:56:03 +02:00
ae2bad5754 Generate bill PDFs from /my/bill 2020-05-07 15:38:49 +02:00
95d43f002f Move django-based uncloud to top-level 2020-05-07 12:12:35 +02:00
Nico Schottelius
3cf3439f1c Move all files to _etc_based 2020-04-02 19:29:08 +02:00
Nico Schottelius
10f09c7115 add an old client hack (just for reference) 2020-03-05 14:15:33 +01:00
Nico Schottelius
b38c9b6060 Ad capability to add and list hosts 2020-02-09 19:27:24 +01:00
Nico Schottelius
a80a279ba5 Add filtering support:
(venv) [12:54] diamond:uncloud% ./bin/uncloud-run-reinstall hack --product 'dualstack-vm' --os-image-name alpine311 --username nicocustomer --password '...' --hackprefix ~/vcs/uncloud/uncloud/hack/hackcloud/ --etcd-host etcd1.ungleich.ch --etcd-ca-cert ~/vcs/ungleich-dot-cdist/files/etcd/ca.pem --etcd-cert-cert ~/vcs/ungleich-dot-cdist/files/etcd/nico.pem --etcd-cert-key ~/vcs/ungleich-dot-cdist/files/etcd/nico-key.pem --list-orders --filter-order-key "status" --filter-order-regexp NEW
2020-02-09 12:54:52 +01:00
Nico Schottelius
5ef009cc9b Begin to phase in features and processing orders 2020-02-09 12:12:15 +01:00
Nico Schottelius
5da6dbb32e ++hack / list products
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2020-02-09 11:14:50 +01:00
Nico Schottelius
3b508fc87d phase in notion of a product 2020-02-09 09:36:50 +01:00
Nico Schottelius
55a2de72c8 [hack] begin to add ldap authentication 2020-02-09 08:51:35 +01:00
Nico Schottelius
d9a756b50e Catch filenotfound errors when launching etcd 2020-02-06 15:33:01 +01:00
Nico Schottelius
aaf0114df1 add image format option 2020-02-06 15:13:08 +01:00
0e667b5262 Fix UUID variable in oneshot/vm/get_name 2020-01-30 09:00:28 +01:00
f2337a14eb Yet another forgotten CLI parameter in oneshot... 2020-01-30 08:55:56 +01:00
8797e93baf Fix --name support in oneshot 2020-01-30 08:54:58 +01:00
9e2751c41e Remove deplicate vm definition in oneshot --stop 2020-01-30 08:52:24 +01:00
17d0c61407 Fix --accel parameter for oneshot 2020-01-30 08:47:23 +01:00
Nico Schottelius
3171ab8ccb [hack/vm] add self.vm dict 2020-01-29 19:55:55 +01:00
Nico Schottelius
56565ac7f7 Fix AttributeError: 'VM' object has no attribute 'vm'
ERROR:uncloud.vmm:Error occurred while starting VM.
Detail qemu-system-x86_64: -drive file=/home/nico/vcs/uncloud/uncloud/hack/hackcloud/alpine-virt-3.11.2-x86_64.iso,format=qcow2,if=virtio: Image is not in qcow2 format
Traceback (most recent call last):
  File "/home/nico/vcs/uncloud/uncloud/vmm/__init__.py", line 186, in start
    sp.check_output(command, stderr=sp.PIPE)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', '-p', 'Enter password to start VM 87230168-1b74-49f7-97c3-c968a26fc65e: ', '/usr/bin/qemu-system-x86_64', '-name', 'uncoud-87230168-1b74-49f7-97c3-c968a26fc65e', '-machine', 'pc,accel=kvm', '-drive', 'file=/home/nico/vcs/uncloud/uncloud/hack/hackcloud/alpine-virt-3.11.2-x86_64.iso,format=qcow2,if=virtio', '-device', 'virtio-rng-pci', '-m', '1024M', '-smp', 'cores=1,threads=1', '-netdev', 'tap,id=netmain,script=/home/nico/vcs/uncloud/uncloud/hack/hackcloud/ifup.sh,downscript=/home/nico/vcs/uncloud/uncloud/hack/hackcloud/ifdown.sh,ifname=uc000000000000', '-device', 'virtio-net-pci,netdev=netmain,id=net0,mac=42:00:00:00:00:01', '-qmp', 'unix:/home/nico/vcs/uncloud/uncloud/hack/hackcloud/sock/87230168-1b74-49f7-97c3-c968a26fc65e,server,nowait', '-vnc', 'unix:/tmp/tmpep71nz1f', '-daemonize']' returned non-zero exit status 1.
ERROR:root:'VM' object has no attribute 'vm'
Traceback (most recent call last):
  File "./bin/../scripts/uncloud", line 82, in <module>
    main(arguments)
  File "/home/nico/vcs/uncloud/uncloud/hack/main.py", line 47, in main
    vm.create()
  File "/home/nico/vcs/uncloud/uncloud/hack/vm.py", line 115, in create
    self.vm['mac'] = self.mac
AttributeError: 'VM' object has no attribute 'vm'
(venv) [18:49] diamond:uncloud% ./bin/uncloud-run-reinstall hack --create-vm --hackprefix ~/vcs/uncloud/uncloud/hack/hackcloud/ --image alpine-virt-3.11.2-x86_64.iso --no-db
2020-01-29 19:30:19 +01:00
Nico Schottelius
1b08a49aef Do not background dnsmasq 2020-01-29 18:45:50 +01:00
Dominique Roux
d8a465bca4 Changed Exception in MAC class 2020-01-29 17:06:54 +01:00
Dominique Roux
dfa4e16806 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-29 17:06:14 +01:00
Dominique Roux
bdbf26cfd4 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-29 17:06:11 +01:00
Dominique Roux
5969d3b13d accessed the mac class with the correct function 2020-01-29 17:04:59 +01:00
3e69fb275f Oneshot: cleanup CLI, initial networking support 2020-01-29 10:08:15 +01:00
618fecb73f Initial implementation (no networking) of uncloud-oneshot 2020-01-28 16:30:43 +01:00
e2cd44826b Fix typo in hack/vm.py 2020-01-28 13:45:20 +01:00
1758629ca1 Add minimal doc to hack/vm.py 2020-01-28 12:33:36 +01:00
a759b8aa39 VMM: make use of socket_dir 2020-01-28 12:24:26 +01:00
4c6a126d8b Hack/VM: wire get_vnc and list_vms 2020-01-28 11:02:18 +01:00
2b71c1807d Wire uncloud-hack vm module to VMM 2020-01-28 09:25:25 +01:00
Dominique Roux
5d05e91335 added hackerprefix argument, changed the commandline structure of vm to work better with sudo 2020-01-24 17:12:50 +01:00
Dominique Roux
8cc58726d0 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-24 14:34:36 +01:00
Dominique Roux
5711bf4770 bugfixes in vm 2020-01-24 14:34:34 +01:00
Nico Schottelius
ae3482cc71 Fix and break some VM stuff 2020-01-24 14:21:38 +01:00
Nico Schottelius
b1319d654a Make me and Dominique happy (aka add vxlan to bridge) 2020-01-24 14:15:48 +01:00
Nico Schottelius
93d7a409b1 Fix Dominique's sudo bug
Totally not related to my previous commit
2020-01-24 14:10:49 +01:00
Nico Schottelius
7e91f60c0a sudo fix 2020-01-24 14:10:08 +01:00
Dominique Roux
58daf8191e refactored vm.py to create a VM 2020-01-24 13:56:08 +01:00
Nico Schottelius
b5409552d8 prepare vm.py for dominique 2020-01-23 21:20:16 +01:00
Dominique Roux
550937630c Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-23 21:17:30 +01:00
Dominique Roux
46a04048b5 small changes in vm.py to make it more generic 2020-01-23 21:17:09 +01:00
Nico Schottelius
3ddd27a08d Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-23 21:16:10 +01:00
Nico Schottelius
c881c7ce4d hack mac: be a proper python class 2020-01-23 21:15:26 +01:00
Dominique Roux
d5a7f8ef59 Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-23 18:43:42 +01:00
Dominique Roux
0982927c1b Added DNSmasq ability for RA 2020-01-23 18:43:41 +01:00
Nico Schottelius
8e839aeb44 commit stuff before dominique does 2020-01-23 18:41:59 +01:00
Nico Schottelius
8888f5d9f7 add logging 2020-01-19 12:55:06 +01:00
Nico Schottelius
bd9dbb12b7 Cleanup networking 2020-01-19 11:30:41 +01:00
Nico Schottelius
b847260768 ++network 2020-01-19 09:16:29 +01:00
Nico Schottelius
1b5a3f6d2e Progress with networking 2020-01-15 13:26:05 +01:00
Nico Schottelius
8a451ff4ff [hack] phase in networking 2020-01-15 12:40:37 +01:00
Nico Schottelius
bd03f95e99 [docs] move one level higher 2020-01-15 11:32:23 +01:00
Nico Schottelius
26d5c91625 Update hacking docs 2020-01-15 10:53:22 +01:00
Nico Schottelius
b877ab13b3 add hack code 2020-01-15 10:02:37 +01:00
Nico Schottelius
12e8ccd01c Cleanups for mac handling 2020-01-14 19:10:59 +01:00
Nico Schottelius
8078ffae5a Add working --last-used-mac
{'create_vm': False, 'last_used_mac': True, 'get_new_mac': False, 'debug': False, 'conf_dir': '/home/nico/uncloud', 'etcd_host': 'etcd1.ungleich.ch', 'etcd_port': None, 'etcd_ca_cert': '/home/nico/vcs/ungleich-dot-cdist/files/etcd/ca.pem', 'etcd_cert_cert': '/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico.pem', 'etcd_cert_key': '/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico-key.pem'}
00:20:00:00:00:00
(venv) [19:02] diamond:uncloud% ./bin/uncloud-run-reinstall hack  --etcd-host etcd1.ungleich.ch --etcd-ca-cert /home/nico/vcs/ungleich-dot-cdist/files/etcd/ca.pem --etcd-cert-cert /home/nico/vcs/ungleich-dot-cdist/files/etcd/nico.pem --etcd-cert-key /home/nico/vcs/ungleich-dot-cdist/files/etcd/nico-key.pem --last-used-mac
2020-01-14 19:02:15 +01:00
Nico Schottelius
1b36c2f96f Write VM to etcd 2020-01-14 14:23:26 +01:00
Nico Schottelius
c0e6d6a0d8 Begin further integration of code into hack 2020-01-14 11:25:06 +01:00
Nico Schottelius
083ba43918 Integrate hack + vm create into python code 2020-01-14 11:22:04 +01:00
Nico Schottelius
22531a7459 Disable cli / otp reading for the moment
Imho this should clearly not leak into scripts/uncloud and
additionally it is broken at the moment
2020-01-14 11:09:45 +01:00
Nico Schottelius
b96e56b453 Begin to integrate hack into the main script 2020-01-14 11:05:42 +01:00
Nico Schottelius
9f02b31b1b Add hacky etcd client 2020-01-13 12:54:02 +01:00
Nico Schottelius
10c8dc85ba Begin hacky database handling 2020-01-13 12:14:30 +01:00
Nico Schottelius
091131d350 dummy 2020-01-13 11:52:40 +01:00
Ahmed Bilal
c3b42aabc6 Added --conf-dir, --etcd-{host,port,ca_cert,cert_cert,cert_key} parameters to cli and settings is now accessbile through uncloud.shared.shared.settings 2020-01-13 05:57:41 +01:00
Nico Schottelius
e6d22a73c5 ++ cleanup 2020-01-12 14:44:53 +01:00
Nico Schottelius
02526baaf9 add ifdown support 2020-01-12 14:43:06 +01:00
Nico Schottelius
3188787c2a ++mac change 2020-01-12 14:38:01 +01:00
Nico Schottelius
94dad7c9b6 Add script to generate mac addresses 2020-01-12 14:35:59 +01:00
Nico Schottelius
53c6a14d60 mac: begin to downstrip 2020-01-12 14:03:04 +01:00
Nico Schottelius
64ab011299 import mac.py from cinv 2020-01-12 13:41:54 +01:00
Nico Schottelius
b017df4879 ignore iso, update nft rules 2020-01-12 13:20:38 +01:00
Nico Schottelius
aaf29adcbb + mac prefix 2020-01-12 00:41:31 +01:00
Nico Schottelius
6d51e2a8c4 [metadata] change default port to 1234 2020-01-12 00:32:17 +01:00
Nico Schottelius
c6b7152464 update nftrules example 2020-01-11 21:21:30 +01:00
Nico Schottelius
8544df8bad don't use tcg 2020-01-11 16:36:41 +01:00
Nico Schottelius
708e3ebb97 cleanup ifup.sh 2020-01-11 16:20:29 +01:00
Nico Schottelius
3b68a589d4 cleanup vm.sh 2020-01-11 16:17:35 +01:00
Nico Schottelius
029ef36d62 net +debug 2020-01-11 15:54:19 +01:00
Nico Schottelius
3cf4807f7c Merge branch 'master' of code.ungleich.ch:uncloud/uncloud
flush ruleset
2020-01-11 02:43:39 +01:00
Nico Schottelius
c1cabb7220 add working nft 2020-01-11 02:42:04 +01:00
Nico Schottelius
5d95f11b3d Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-11 00:24:25 +01:00
Nico Schottelius
23d805f04f ++stuff 2020-01-11 00:24:17 +01:00
Nico Schottelius
3825c7c210 Add vxlan into the bridge 2020-01-11 00:23:55 +01:00
Nico Schottelius
7c9e3d747a Merge branch 'master' of code.ungleich.ch:uncloud/uncloud 2020-01-11 00:06:29 +01:00
Nico Schottelius
b9c9a5e0ec add working network 2020-01-10 23:55:21 +01:00
Nico Schottelius
ebcb1680d7 add hack scripts 2020-01-10 23:27:21 +01:00
00d876aea1 Do not break if client section/or OTP creds missing from conf file 2020-01-10 16:39:40 +05:00
31ec024be6 passing arguments dict to componenets instead of **kwargs 2020-01-10 15:45:48 +05:00
Nico Schottelius
b7596e071a begin phasing in arguments instead of **arguments 2020-01-10 11:30:23 +01:00
Nico Schottelius
71fd0ca7d9 Remove double try/except blocks (with wraps) 2020-01-10 11:00:00 +01:00
Nico Schottelius
92f985c857 Handle etcd connection error 2020-01-10 10:10:37 +01:00
48efcdf08c 1. mp.set_start_method('spawn') commented out from scripts/uncloud
2. uncloud.shared moved under uncloud.common
3. Refactoring in etcd_wrapper e.g timeout mechanism removed and few other things
4. uncloud-{scheduler,host} now better handle etcd events in their block state (waiting for requests to come)
2020-01-09 00:40:05 +05:00