Commit Graph

30 Commits

Author SHA1 Message Date
Piyush Gupta 2655898752 minimal-iso: Creating photon minimal-iso
-  Addded a new target 'minimal-iso' in Makefile
  * This generates photon-minimal-*.iso and corresponding debug iso
  * Size of minimal-iso is 263MB and size of debug iso is 1166M
- minimal-iso skips photon flavour selection(edge, developer and ostree) UI

Change-Id: I945d74e13c0fbca700cfd6a18467fdac42b68f87
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8254
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
2019-10-28 11:04:07 -07:00
Alexey Makhalov 9273a97061 installer: refactor UI initialization
Move curses.wrapper down to classes/methods instead of
wrapping entire isoInstaller.
It will allow us to run KS installation in console(non curses)
mode, if install_config['ui'] set to false.

Extras:
1) Cleaned up logging.
2) Introduced install_config['log_level'] parameter.
3) Introduced --ui-config argument for isoInstaller.
4) Fixed ostree installation path. OStree installer works,
but target system was not tested.
5) Moved ostree specific install_config options under
install_config['ostree']

Change-Id: I6c31821778d506f3f28fa07254a556830b1fe534
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8156
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
2019-10-08 15:16:20 -07:00
Alexey Makhalov b291a1d201 installer: reorganize entry point
Installer engine consist of two pieces (stages):
1) installer.configure(install_config, ui_config)
   - install_config is a KS input config as well as 'installer'
     portion of image builder config
   if 'install_config' is None then configure will trigger
   interactive ncurses configurator
   - ui_config is a config for interactive ncurses configurator.
     Can be used to control what screens to show.
   No actions allowed toward target system (disk or image) during
   configure stage.

2) installer.execute(install_config)
   - takes install_config and "execute" it. All actions on target
     system are performed here.

Installer can be run as an app, like ./isoInstaller

In this case control flow looks like:
isoInstaller
  <detect KS from kernel cmdline> - no luck
  installer.configure(None, ui_config)
    ui_config - run ncurses interractive installer to
                construct 'install_config'
    <perform sanity checks of install_config>
  installer.execute(install_config)

When isoInstaller detects KS file - control flow is like:
isoInstaller
  <detect KS from kernel cmdline> - success - create 'install_config'
  installer.configure(install_config, None)
    <perform sanity checks of install_config>
  installer.execute(install_config)

When installer called from image builder it is similar to KS case:
image builder
  <parses its config file> - creates install_config out of
                             'installer' section
  installer.configure(install_config, None)
    <perform sanity checks of install_config>
  installer.execute(install_config)
  <performs post actions>
  <convert raw disk to some output format>

Changed images config file to move installer specific
changes to 'installer' subsection

Deprecate install_config fields: iso_installer, ui_install,
additional-files.

Unified password related logic in installer and removed it
from image builder.

Added ks_config.txt file - documentation for ks file format.

NOTE: this commit can break ostree, as it was not tested.

Change-Id: I3f718b6793c7f0befeb63df4d7e99072cf4d7693
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8127
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
2019-10-04 11:00:33 -07:00
Alexey Makhalov 661da1302e installer: move partitioning to execution stage
Do not do partitioning in the very beginning of ui config
or at the end of ks config. Merge partitioning code and
move it to installer execution. Remove any partitioning
code from selectdisk ui screen.

Extras:
- deprecate 'vmdk_install' (it is same as 'not iso_installer')
- improve nsurses ui rendering. Avoid unnecessary refresh.
- removed unused param in display() and menu items handlers

Change-Id: I90522da30bb29b452bb68e64e749ab81177875a0
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8088
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
2019-09-25 15:10:49 -07:00
Alexey Makhalov 16d923c8e5 installer: make it runnable as an app
The purpose of this commit is to improve debugability
of installer codebase. Installer can be run from running
Photon OS instance just as "./isoInstaller". You do not
need to create bootable ISO and run it to verify installer
code.
Changes in this commit:
- use local input.json as build_install_options
- support "packages" field in build_install_options file
- do not modify and use host's /etc/yum/repos.d and
  /etc/tdnf.conf create them in working directory instead
- added --rpms-path parameter, default: ../stage/RPMS
- add logging of shell scripts to installer.log
- do not use "swapoff -a" at finalize step, swapoff only
  installer created swap

Change-Id: I9cf034ba069e4625bd79a22aff6db3bbcba869d0
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8024
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
2019-09-18 13:36:28 -07:00
suezzelur d07c27b729 Additional improvements to image builder
-Remove the use of photoninstaller.py
-Replace image builder script
-Enhance image builder config file
-Support image building using config files from Makefile
    - make image IMG_NAME=<name>
    - make image CONFIG=<config_file>
    - or combination of both the above

Change-Id: I1a0db70969224826130c5e4c25a74e7217a8dace
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6150
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
2018-11-14 17:36:26 -08:00
suezzelur ee1e6b58f2 Installer and image builder improvements
- Use image-builder instead of cloud-image-builder
- Remove install type from json files for images
- Clean up json files
- Add metapackage minimal
- Remove full flavor from ISO and add developer and edge
- Remove installation type from json files and use package list json

Change-Id: I6b667beb92f9f68533e48482f84139102b818342

Conflicts:
	Makefile
	support/package-builder/SpecData.py
Change-Id: Iff18095a5f53151d0456c694c039da720eef2398
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6170
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
2018-11-14 17:35:46 -08:00
Srivatsa S. Bhat (VMware) 3617618a31 PackageSelector: Get rid of the 'remove' option temporarily
The recent changes related to multi-versioning broke the
PackageSelector code that deals with replacing certain packages with
other alternatives (eg: replacing linux with linux-aws for AMIs). This
feature will be reimplemented in a different way shortly; so in
preparation, get rid of the 'remove' option.

Change-Id: Ibb51fcf52f775655d946c9b798b809772dbd380c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5961
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
2018-10-23 12:34:00 -07:00
Srivatsa S. Bhat c01f1bffd1 kernels: Add linux-aws kernel tuned for deployment on Amazon AWS
Use the spec and config file for generic kernel as a starting point.
No AWS-specific changes yet.

Change-Id: I7bfd162f2d7dca0af5e6ef866b6217cb34835c8c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4820
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
2018-03-16 15:09:33 -07:00
xiaolin-vmware c533b30802 Clean install code. Limit all lines to a maximum of 99 characters
Change-Id: I9d4758fb6428aa41305a165a076d9156e46b4e42
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4576
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
2017-12-28 13:39:44 -08:00
xiaolin-vmware c7dd4da8d5 installer : check if /etc/resolv.conf exists before copying, remove unused import.
Change-Id: Iff87c0f9a6d84713a5957fa6fde56894df868176
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3973
Reviewed-by: Bo Gan <ganb@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
2017-10-06 10:06:31 -07:00
xiaolin-vmware 0c250142d7 installer:
-- remove unused shebangs.
-- interger division with operator //
-- replace Set with set.
-- replace `` with repr.
-- replace has_key with in

Change-Id: I8ef92b42cb1a4477eb8be23da6a86499a3436876
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3860
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
2017-10-03 12:34:52 -07:00
xiaolin-vmware 564d9533d5 Add a screen to select between linux and linux-esx when vmware virtualization is detected.
Change-Id: I6b46b3edbf6356e11963c56a7c800da87dd58881
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2122
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
2017-03-25 00:41:13 -07:00
xiaolin-vmware fcc5e76bc9 Remove package_extra.json.
Change-Id: I938a87a984649c9e73f0591d83291620295dd831
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1859
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
2016-12-14 15:00:29 -08:00
yangyao2 72832a72f4 modified ui with tab removed, and disk partitioning
Change-Id: I4b459f3bc2c81fa6b48cbf110f61be0667086144
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1625
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>
2016-11-04 16:38:01 -07:00
Mahmoud Bassiouny 8d282b9969 Adding the minimal flavor is the default selection during the installation 2015-08-14 17:12:17 -07:00
Harish Udaiya Kumar 168bbfed4e Minor fix to remove the unwanted if condition. 2015-08-12 11:37:49 -07:00
Touseef Liaqat f04583fc50 Fix a bug in ISO. Update OSTree installation options. Have random hostname prefilled. 2015-08-12 09:58:24 -07:00
Harish Udaiya Kumar 2cbd5a80b2 Updated the photon installer to automatically package and install dependencies. 2015-08-11 15:23:32 -07:00
Mahmoud Bassiouny 0ed1a8fc7b Adding ks support to install ostree server
Have the kickstart support installing ostree server.
2015-08-10 16:46:26 -07:00
Touseef Liaqat 2f46569e3c Add ostree-repo as tar file in the ISO and untar in OSTree-Server installation. Add new OSTree-Host ISO artifact. 2015-08-07 17:39:56 -07:00
Touseef Liaqat 4d53ba0374 OSTree Host and Server installation options in added in ASP Installer. 2015-07-29 15:24:25 -07:00
Anish Swaminathan bbb09faa8e Make the load package list method static 2015-07-13 14:45:00 -07:00
YustasSwamp dc0dfc30be Remove 'order' property. Use sorted dictionary. 2015-07-12 17:12:25 -07:00
Anish Swaminathan 05640f92d6 Remove type field from build_install json files 2015-07-10 17:49:42 -07:00
Anish Swaminathan d0c82d346c Read in multiple package include types 2015-07-10 17:40:36 -07:00
Anish Swaminathan bb884b5b6b Add the ability for a installation type to reference another type and include the package list form that type 2015-07-09 19:12:59 -07:00
Touseef Liaqat 5d05cfcce4 Build only minimal packages if minimal-ISO is being created. Also create common folder for all json package files to be used by both installer and package builder. 2015-06-29 04:41:57 -07:00
Touseef Liaqat 4d6a578d45 Create minimai ISO with less then 300MB of iso size. Usage: sudo make minimal
To achieve that seperated all installation types into individual json files. And created a new higher level configuration file that will have installation options and their repective package list file.
This will also allow us to easily add new installation type and remove it.
Another goal is that we could provide this new config files to Build system to ONLY build the packages that are going to packaged inside the ISO.
2015-06-28 00:16:23 -07:00
Mahmoud Bassiouny f4d17450ce Initial commit 2015-04-15 11:00:13 -07:00