Commit Graph

422 Commits

Author SHA1 Message Date
Ryan Harper 79f072ec43 geninstaller: Check overlayfs module version instead of Ubuntu release
overlayfs changed mount options between different kernel versions.
In some cases, an Ubuntu release may have a different kernel than
what was included during the release, so instead use the version
included in the module itself to determine what parameters to pass
when mounting.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-23 09:46:22 -05:00
Ryan Harper 5f424963dc Add efi deps to installer/geninstaller
geninstaller should ensure it has all of the packages it needs to build.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-23 09:22:28 -05:00
Ryan Harper 7501e26fac Makefile: Spell ovmf correctly
Fix package name thinko in Makefile

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 22:23:04 -05:00
Ryan Harper d85bb52a63 Finish enabling EFI boot mode
- Fix up issues with efi mode grub serial configuration
- Modify blockdev model to order storage configuration output
- Handle when we're running in uefi mode

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 22:19:54 -05:00
Ryan Harper b5b1a00744 Enable running installer in efi mode
Use a flag to set efi mode or not.  Switch to IDE controller for
disks as UEFI bios doesn't support virtio block devices.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 13:37:51 -05:00
Ryan Harper df2c3c6aca Update grub2 configuration for UEFI
Update grub2 configuration for UEFI booting with fallback to bios mode.
Include new detection scheme so we don't list existing partitions of the
installer.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 13:21:14 -05:00
Ryan Harper 522a546b5c Modify geninstaller for uefi booting
Switch image to use overlay partition and use uefi layout and boot loader
configuration.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 13:15:00 -05:00
Ryan Harper a744245f03 Add install_deps_$(ARCH) target to split out per-arch deps
Move arch specific packages into their own target

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 08:44:18 -05:00
raharper 88334d4075 Merge pull request #43 from CanonicalLtd/render_network_config
Render network config
2015-09-21 16:43:47 -05:00
Ryan Harper 3f88e6ea09 Merge branch 'render_network_config' of github.com:CanonicalLtd/subiquity into local-render-network
Conflicts:
	subiquity/controllers/filesystem.py
2015-09-21 16:42:18 -05:00
Ryan Harper 6bbf6ba1c8 Fix up user configuration in install image
We use cloud-init to create the initial user on the target system.
Ensure the password login works, that it has a shell (/bin/bash)
and sudo privs via group admin.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 16:40:36 -05:00
Ryan Harper acab44c1ec Update dhclient apparmor profile under overlayroot
With updated kernels, overlayroot programs will fail with
a disconnected_path error.  Resolve our use of dhclient by
adding the allow_disconnected flag to the profile.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 16:40:35 -05:00
Ryan Harper 9138137057 Fix up async install commands
- Pass in write_fd into async commands so output calls refresh
- Hack the threadpool to a single task so we trivially block on the long
  install and don't invoke our post install until the other is complete
- lots of debugging for command outputs.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 16:40:35 -05:00
Ryan Harper 3f2a64b032 Fix curtin invocation
Move config writeout to a non-coroutine method.
Add realname collection (needed for userinfo)
Add debugging to help find issue with async commands

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 16:40:35 -05:00
Ryan Harper fbee724441 Split out curtin configuration files
Break out curtin configuration data into multiple configuration files
This sets up our initial install (network +storage) and our secondary
run (postinstall user config).

- encrypt the users password and never log the original value

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>

Conflicts:
	subiquity/controllers/filesystem.py
2015-09-21 16:40:26 -05:00
Ryan Harper 53b9e59929 Generate network configuration
Update network model to generate a network configuration for each
active network device.  Note, some of the examples won't quite work
since we now want updated probert data which includes new information
about the source of any discovered ip.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 16:39:54 -05:00
Ryan Harper 0beb904448 Fix up user configuration in install image
We use cloud-init to create the initial user on the target system.
Ensure the password login works, that it has a shell (/bin/bash)
and sudo privs via group admin.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 13:17:24 -05:00
Ryan Harper e888b13707 Update dhclient apparmor profile under overlayroot
With updated kernels, overlayroot programs will fail with
a disconnected_path error.  Resolve our use of dhclient by
adding the allow_disconnected flag to the profile.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-21 13:16:06 -05:00
Adam Stokes 1d1f9d5d8f Add network set default route view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-16 10:06:50 -04:00
Adam Stokes 1ebeb45240 Merge pull request #42 from CanonicalLtd/fix-serial-mode
Fix serial mode
2015-09-15 07:51:19 -04:00
Ryan Harper 2cf528d6d3 Fix serial mode
We can't use curses_display with an external event loop (tornado).  The good
news is that we don't have to.  Instead we switch to using agetty to bypass
login, specify the installer and options to execture.  This also handles
respawning the installer and works both on serial and without.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-14 16:40:28 -05:00
Adam Stokes 9d39025f2e disable ceph/iscsi views for now
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-14 14:44:15 -04:00
Ryan Harper 27fb85d9b7 Fix up async install commands
- Pass in write_fd into async commands so output calls refresh
- Hack the threadpool to a single task so we trivially block on the long
  install and don't invoke our post install until the other is complete
- lots of debugging for command outputs.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-11 15:53:34 -05:00
Adam Stokes dbad01aa11 Add additional filesystem sections
This contains views/controllers/models for setting RAID,
assigning Ceph storage, and iSCSI.

They are all in their initial implementation stage and
does require more work on the backend to make these
items usable.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-11 15:16:39 -04:00
Ryan Harper 27309f52bd Fix curtin invocation
Move config writeout to a non-coroutine method.
Add realname collection (needed for userinfo)
Add debugging to help find issue with async commands

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-11 13:12:26 -05:00
Ryan Harper 30707efc56 Split out curtin configuration files
Break out curtin configuration data into multiple configuration files
This sets up our initial install (network +storage) and our secondary
run (postinstall user config).

- encrypt the users password and never log the original value

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-11 10:30:46 -05:00
Ryan Harper baf6e377a9 Generate network configuration
Update network model to generate a network configuration for each
active network device.  Note, some of the examples won't quite work
since we now want updated probert data which includes new information
about the source of any discovered ip.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-11 10:30:46 -05:00
Adam Stokes b3f09832d4 Merge pull request #39 from CanonicalLtd/fix-network-display
Fix network connection display
2015-09-08 16:03:36 -04:00
Ryan Harper a1abcb31ac Fix network connection display
- Adjust the size of the column with iface name, cap the max size
- Find and remove any set of 'Unknown' displays of info
- Replace the 'Checking' status with the current state of the connection
  For now, it will always be definitive since we check for connections
  upon boot.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-08 14:49:24 -05:00
Adam Stokes 0b5dd20f63 Additional disk models added
initial models for Ceph, iSCSI, RAID

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-08 11:13:16 -04:00
Adam Stokes 2f738c7ad8 Merge pull request #38 from CanonicalLtd/fix-no-nics
Fix no nics
2015-09-03 14:50:23 -04:00
Ryan Harper 8aedabef3b Add nonic example file
Test nonics with:  MACHINE=examples/nonics.json make

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:47:35 -05:00
Ryan Harper dfc9d02b02 Handle when we don't have any nics at all.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:46:51 -05:00
Ryan Harper 7c06be6d82 lint fixes for recent code
Fix up make lint for files we've touched.  Still some work to do for others

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 13:35:07 -05:00
Ryan Harper fb5e7b7e91 Fix 10 Gig network display
python3 likes to make floating point numbers when dividing a lot.
Fix with cast to int.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:53:08 -05:00
Ryan Harper 0fca368ba4 Update probert commit revno
Update probert revno to use newer network probing data.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:50:35 -05:00
Ryan Harper bcf4f37ea4 Fix typo in fetching ip source and provider
Copy and paste error on fetching ip source provider.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:49:21 -05:00
Ryan Harper d8814c6648 Update networking model and view to use new probert data
Probert now collects more information on ips, bonds and bridges
Use this information to display Network view closer to spec.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:47:17 -05:00
Adam Stokes 2ff52fdaec Add disk info view
Adds ability to view disk information via hdparm
if run as root, otherwise, will print error to
the ui (ie. permission denied.)

As a result updated the run_command routine
to be a little more robust.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-02 15:21:14 -04:00
Adam Stokes 11e76e85d2 add probert to ignore list
Gets pulled in externally, lets not commit it
twice by accident

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-09-02 14:08:39 -04:00
raharper 0991ac41cd Merge pull request #37 from CanonicalLtd/fix-max-partsize
Fix max partsize
2015-09-01 17:06:45 -05:00
Ryan Harper fbb8eb09fb Adjust partition alignment for GPT and curtin sgdisk
Curtin uses sgdisk to create partitions.  To avoid sgdisk
fixing alignment issues we ensure that all partitions are
1M aligned.

GPT partitions also require space at the end, reserve the
same number of sectors (1K, 2048 512b sectors) at the
start and end of the disk.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 17:01:07 -05:00
Ryan Harper 7ff3f549c2 Fix partition size selection and logging
- Fix max size partition edge case
- Ensure if nothing is entered we select the max size
- Adjust offset and size calculations for actions

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 11:28:23 -05:00
Adam Stokes 477dc6d783 Merge pull request #36 from CanonicalLtd/update-makefile-topdir
Update topdir Makefile targets
2015-09-01 11:13:47 -04:00
Ryan Harper 8d678ad353 Update topdir Makefile targets
A number of changes to the toplevel make file and dir structure.

- deb-src and deb-release fail because debian was a symlink.  This is not allowed
  so instead we git clone and then move the debian dir to the toplevel.
- Fix the clean target to only run rules/debian if the debian dir exists.
- Drop probert as a submodule and instead clone it as needed, controlling the
  version through a Makefile variable.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 10:04:24 -05:00
Adam Stokes 73a91728bc add more statusbar notifications
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 12:03:53 -04:00
Adam Stokes d149a0c014 Additional UI notifications and consolidate common attrs
We now pass a common dictionary with attributes needed
throughout our controllers. The common dictionary now
contains:

- eventloop
- ui widgets
- signal handler
- prober options
- cli arguments

In addition we've extended the progress indicator to
include a progressbar.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 11:55:46 -04:00
Adam Stokes cd14fb2bdb Use our signal class emitter
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 10:50:59 -04:00
Adam Stokes 4ff83aa99e add another machine json
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-31 09:37:39 -04:00
Adam Stokes e1739bb615 View progress output after identity panel
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 20:08:30 -04:00