Commit Graph

4005 Commits

Author SHA1 Message Date
Adam Stokes 5269e9696a Update probert code
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-13 09:32:13 -04:00
Adam Stokes b3b2135a82 Merge pull request #13 from CanonicalLtd/partitioning
Implement parted device model for handling partition building
2015-07-12 13:34:15 -04:00
Adam Stokes 277f819b4d Merge pull request #12 from CanonicalLtd/integrate_curtin_v2
Integrate curtin v2
2015-07-12 13:33:02 -04:00
Ryan Harper cfffcf34e4 Implement parted device model for handling partition building
Partial implementation using parted to model new partitions.
Add a method to track sequential actions taken against block
device and can write out a storage config file for curtin.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-10 15:58:25 -05:00
Wesley Wiedenmeier 5861890397 Added options to boot using serial or graphical tty 2015-07-09 15:43:34 -05:00
Wesley Wiedenmeier fbfebeb8ed Added loading part_msdos and part_gpt modules 2015-07-09 10:26:28 -05:00
Wesley Wiedenmeier a520cd897d Added default and timeout 2015-07-08 16:41:09 -05:00
Wesley Wiedenmeier d786eb2e86 Fixed font issue by manually loading unicode.pf2 2015-07-08 15:09:31 -05:00
Wesley Wiedenmeier 2cfe2ffe71 Added support for more advanced booting with grub2
- installer/geninstaller: when -b grub2 flag is given, installs grub2 using
   grub-install, copies installer/resources/grub/grub.cfg onto target
 - installer/resources/grub/grub.cfg: grub configuration that in addition to
   having a menuentry for the installer, scans all partitions on the system
   other than the one it is running from for linux installations and creates
   menuentries for the other installations as well, to deal with potential
   situations where the user reboots the system after installing but does not
   remove the installation disk
2015-07-08 14:21:42 -05:00
Ryan Harper 47540e6bf2 Switch storage module logging to debug and json format
The logging data generated during storage probing is
hard to read, so instead, dump the data out via json.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 15:52:48 -05:00
Ryan Harper e93ece6ea6 Fix wrong PYTHONPATH
Screwed up the merge and broke import path to probert.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 14:34:26 -05:00
Ryan Harper 269af56576 Updated bootsplash
Less flashy for now.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 14:01:48 -05:00
Ryan Harper dabdca2320 Detect successful install
Detect successful install by looking at output from
curtin logged to a file.  Also read for input from
user on successful install.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 14:00:50 -05:00
Ryan Harper cd52672fd7 Hide floppy error output
Not clear how else to resolve this, possibly patch to upstream kernel
but unlikely. so let's disable the floppy disk in our VM.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 13:55:42 -05:00
Ryan Harper 2b06bdc1da Call curtin to complete install
- Use updated probert *Info class for accessing object data
- Add --dry-run parameter to prevent invoking curtin when testing
- Add new make target to run ui-view by default with --dry-run
- Use a template to write out curtin config file for installation
- Use virtio disks and multiple nics to test probing.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-06 12:34:24 -05:00
Adam Stokes 02d1ba864b Reduce column width for available disk selection
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-02 20:53:18 -04:00
Adam Stokes e49d2362c1 Remove excerpt from filesystem view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-02 20:52:19 -04:00
Adam Stokes 22327f2849 Make title, excerpt optional for header widget
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-02 20:52:05 -04:00
Adam Stokes d1ec1bd933 Add ability to query current route controller
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-02 20:50:54 -04:00
Adam Stokes 70dead7abb Update probert
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-02 16:29:14 -04:00
Adam Stokes 8db1a34501 Simple json/yaml export of Model instances.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-01 17:45:17 -04:00
Adam Stokes 4588a52ebf add 'tab' and 'shift tab' for down/up movement
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-01 17:23:11 -04:00
Adam Stokes c6572f4663 Update filesystem view pane
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-01 17:20:17 -04:00
Adam Stokes a986e80595 Fix high cpu usage with asyncioeventloop
Apparently asyncioeventloop needs more than a shim to work properly
in urwid <= 1.2.1. Remove the shim and revisit once urwid 1.3.0 is
packaged in Debian/Ubuntu

Fixes #11

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-01 17:05:27 -04:00
Adam Stokes b649c5b0fb Raise exception in loop_shim
Fixes #10

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 18:10:51 -04:00
Adam Stokes d331b60e40 fix apostrophe, blame google docs.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 18:05:41 -04:00
Adam Stokes 6dba22abc5 fix redrawing of screen in serial mode
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 17:53:12 -04:00
Adam Stokes 065863d451 Add AsyncioEventLoop shim for urwid versions shipped with Ubuntu
The virtualenv was proving more complicated to use during the
image building process. Broke off our own shim until Debian/Ubuntu
get newer urwid packages.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 16:08:42 -04:00
Adam Stokes 37527abd60 render existing partition devices
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 16:08:16 -04:00
Adam Stokes 6c6e2f999c Update palette high colors
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 15:00:05 -04:00
Adam Stokes da945e2232 Add usage for running ui locally
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 14:07:29 -04:00
Adam Stokes b8cd304d33 Add async helper
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 14:04:39 -04:00
Adam Stokes f20cc03cb0 Fix filesystem model initialization and access
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 14:04:19 -04:00
Adam Stokes 93ab6b893b Use asyncio eventloop
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 13:03:20 -04:00
Adam Stokes 30ff22d6bd fix lint error
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 13:03:07 -04:00
Adam Stokes 5adeaeb56b Use virtualenv to make use of urwid 1.3.0 and the asyncio library
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-30 13:02:39 -04:00
Adam Stokes 81c58c8b27 Breakup interace attributes into a separate column
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-29 16:01:16 -04:00
Adam Stokes 06864f86df update probert submodule
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-29 15:01:47 -04:00
Adam Stokes cb048a6256 Merge pull request #9 from CanonicalLtd/fix_issue_8_network_missing_keys
Handle network devices with missing udev hardware data
2015-06-29 15:01:35 -04:00
Ryan Harper e1f7e509ea Handle network devices with missing udev hardware data
We've encountered some usb nics which don't have an entry
in the udev database, subsequently the ID_XXX_FROM_DATABASE
isn't present in the output.  Address this by using some
fallback keys, ID_XXX, ID_XXX_ID and an Unknown value if
all fail.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-29 13:57:45 -05:00
Adam Stokes be7534fb54 initialize networkmodel class in controller
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-29 11:26:52 -04:00
Adam Stokes 8826287e2f add probert to python path
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-29 11:15:11 -04:00
Adam Stokes be0f6700ef add probert submodule
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-06-29 11:09:19 -04:00
Ryan Harper 8902942fc0 Fix storage size
Disk attributes are in sector size, so scale by 512.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:54:03 -05:00
Ryan Harper 6b82c1fc7e create model class in views
The model gets passed into the view, but it's only the class name
We need to create an object of the model class before we can use it.

Also implement new network get_iface_info to dump additional iface
info in the view.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:44:19 -05:00
Ryan Harper 4418c94521 Fix up lint and errors in filesystems
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:22:49 -05:00
Ryan Harper 940b20be08 Lint fix for welcome
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:18:24 -05:00
Ryan Harper b347c17ba7 Lint fix for network
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:17:57 -05:00
Ryan Harper 7e8bc56fec Remove unneeded time/math modules
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:16:39 -05:00
Ryan Harper fa80b0cabe Add probert to subiquity
Update subiquity welcome controller to call probert to extract
host information and present it to the user briefly before
invokin the curtin installer.

Add the install_src to git clone probert.  Pack this as a tarball
in the user-data like subiquity.

Update user-data package installs for new probert deps.

Modify boot parameters to handle systemd persistent nic naming;
we may not always have eth0 as a nic.  Subsequently update
user-data to use bootcmd to automatically attempt to bring up
nics during the boot before the installer.

Finally fix commandline parsing/output in geninstaller.
Implement version parameter and better caching of previous
maas ephemeral images.

Fix issue with removing cache after unpacking rootfs which is
now owned by root (add sudo to rm of cache).

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-06-25 21:12:42 -05:00