anaconda devconf 2013
TRANSCRIPT
-
8/13/2019 Anaconda DevConf 2013
1/26
Architecture
Vratislav PodzimekPresented by
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
Anaconda Installer
http://creativecommons.org/licenses/by/3.0/http://creativecommons.org/licenses/by/3.0/ -
8/13/2019 Anaconda DevConf 2013
2/26
Today's Topics1. What is Anaconda?
2. Why (UI) rewrite
3. The NewUI
4. Architecture
a. Data representation
. !u"#po$e %ode&
'. Threads and co%%unication. Initia& #etup
. Addon de*e&op%ent
-
8/13/2019 Anaconda DevConf 2013
3/26
+# insta&&er ,or -edora /!0 and deri*ati*es doine*erythin e&se ut insta&&in
ython pac$ae (pyanaconda) %ain script dracut &iand unit ,i&es
supposed to5
support oth auto%ated ($ic$start) and %anua&insta&&ations and a&so the co%ination o, oth
support raphica& %ode and te6t %ode ,or o&dse7uentia&8on&y ter%ina&s (s39:6)
e si%p&e ut in the sa%e ti%e co%p&e6
What is Anaconda?
-
8/13/2019 Anaconda DevConf 2013
4/26
decided at -UD;on Te%pe 2:11%ain reasons5
non8%odern UI orn %ore than 1: years ao
UI8contro&&in &oic %i6ed with the insta&&ation &oicasica&&y a sin&e thread steppin the
-
8/13/2019 Anaconda DevConf 2013
5/26
%odu&ar e6tensi&e %u&ti8thread
!u"#po$e as the asic %ode&
raphic desined y =>irn Du,,y
$ic$start @ se&,.data @ $ic$start
custo%iBation screens durin pac$ae insta&&ation
code shared with the new pure&y te6tua& te6t %ode and
Initia& #etup%ore transactiona&
pyanaconda.storae separated as blivet
4C99 insertions() 43C: de&etions(8)
The "e!UI no more scary Anaconda
-
8/13/2019 Anaconda DevConf 2013
6/26
Architecture
-
8/13/2019 Anaconda DevConf 2013
7/26
#ataa&& stored in the py$ic$start.#!and&er instance
&i,e cyc&e5
&oaded ,ro% the $ic$start ,i&e (i, any)
updated with userEs choices %ade in the UIused to dri*e the insta&&ation
written out as $ic$start ,i&e
tree structure
read updated and written out a&so y the Initia& #etup
setupand execute%ethods doin the insta&&ation &oic
-
8/13/2019 Anaconda DevConf 2013
8/26
$ub%&poke model
-
8/13/2019 Anaconda DevConf 2013
9/26
$ub%&poke modeleasy and ,ast access to e*erythin
no need to *isit e*ery spo$e
o*er*iew o, the settins (updated y ac$round
threads)&ayout with reat support ,or e6tensions
usa&e ,or oth raphica& and te6t %ode
-
8/13/2019 Anaconda DevConf 2013
10/26
$ub &poke % Anaconda
-
8/13/2019 Anaconda DevConf 2013
11/26
$ubsstanda&one spo$es and hus are dyna%ica&&y co&&ected,ro% the prede,ined p&aces
cateories and spo$es are dyna%ica&&y co&&ected ,ore*ery hu
the #u%%ary hu and the roress hu
continue possi&e once a&& %andatory spo$es areco%p&eted
auto%ated insta&&ations show su%%ary and proressut continue auto%atica&&y (un&ess user chanesanythin %anua&&y)
-
8/13/2019 Anaconda DevConf 2013
12/26
&pokes#tanda&one#po$e and Nor%apo$e c&asses toetherwith custo% windows (
-
8/13/2019 Anaconda DevConf 2013
13/26
"ormal &pokeasic ui&din &oc$ o, the NewUI
AI de,ined attriutes5
uiFile, mainWidgetName, category, icon, title,
AI de,ined %ethods5
initializeand refresh
applyand execute
AI de,ined properties5ready, status
mandatoryand completed
-
8/13/2019 Anaconda DevConf 2013
14/26
Threads and tk
-
8/13/2019 Anaconda DevConf 2013
15/26
Threads and messa)esthreads ,or a&& &on &astin actions
Thread=anaer sin&eton and AnacondaThread c&ass,aci&itatin &oin and threads usae (a&so e6ceptionhand&in)
two %essae 7ueues
huH ,or spo$e to hu co%%unication
proressH ,or reportin and updatin insta&&ation
proresse6peri%enta& i%p&e%entation a&so ,or the te6t %ode(
-
8/13/2019 Anaconda DevConf 2013
16/26
Initial &etup-irstoot rep&ace%ent ut the o&d one has to sur*i*eecause o, the &eacy 3rd party p&uins
asica&&y on&y 4: &ines o, code reusin the code andscreens ,ro% Anaconda
reads $ic$start ,i&e produced y Anaconda and writesa new one at the end
coordinates screens with Anaconda and
-
8/13/2019 Anaconda DevConf 2013
17/26
Initial &etup
-
8/13/2019 Anaconda DevConf 2013
18/26
Addons%any tea%s want to ha*e so%ethin set in theinsta&&ation process (or ,irst oot) ut we cannotde*e&op and %aintain a&& that stu,,
e6a%p&es o, possi&e addons5
AD$ereros rea&% Join with rea&%d
#;A security pro,i&e
suscription %anae%ent
0%acs 5)
-
8/13/2019 Anaconda DevConf 2013
19/26
Addon development$ic$start part (%ust e i%p&e%ented)5
c&ass parsin &ines ,ro% the specia& Kaddon sectionand storin data ,ro% the% as its attriutes
&i*es in the se&,.data.addons.L sutree%ethods to %odi,y runti%e en*iron%ent (setup) andcon,iure insta&&ed syste% (execute)
UI part (optiona&)5
-
8/13/2019 Anaconda DevConf 2013
20/26
Addon structurea directory under usrshareanacondaaddons
top8&e*e& directory na%ed a,ter the addon(e.. orG,edoraGhe&&oGwor&d)
sudirs ,or particu&ar parts 88 $s ui tuip&aced to the insta&&ation tree y &ora6 or withproduct.i% 88 sti&& ein decided
c&asses auto%atica&&y co&&ected and used i, they are
suc&asses o, c&asses de,ined y the AI
-
8/13/2019 Anaconda DevConf 2013
21/26
Addon $*WT*we&&8co%%ented !e&&o wor&d addon M2
sources o, rea&wor$in instances (co%in soon)
Anaconda Addon De*e&op%ent
-
8/13/2019 Anaconda DevConf 2013
22/26
Addons +A,Why such a ad na%e?
We donEt ha*e any etter.
What happens i, the addon ,or so%e Kaddon section
is %issin?Nothin. The Kaddon section is inored and Justpasted to the resu&tin $ic$start ,i&e.
Which &anuaes are supported?
ython on&y.
-
8/13/2019 Anaconda DevConf 2013
23/26
Addons +A, cont-Why this Kaddon section %ar$in the ,unctiona&ity asein a%ended? ;anEt addon that needs on&y one &ineJust reister a new $ic$start co%%and?
It is possi&e ut the pro&e% is with theksvalidator
too& that needs to distinuish etween in*a&idco%%and and a co%%and o, a %issin addon.
-
8/13/2019 Anaconda DevConf 2013
24/26
sti&& wor$ in proress
%u&ti8thread
-
8/13/2019 Anaconda DevConf 2013
25/26
.inks
[1] Anaconda!ew"nstaller wiki
[#] $ello world addon
[3] Anaconda Addon %evelopment &uide
['] Anaconda sources
https://fedoraproject.org/wiki/Anaconda/NewInstallerhttp://www.fi.muni.cz/~xpodzim/git/?p=hello-world-anaconda-addon.githttp://www.fi.muni.cz/~xpodzim/git/?p=anaconda-addon-guide.git;a=summaryhttp://git.fedorahosted.org/cgit/anaconda.git/http://git.fedorahosted.org/cgit/anaconda.git/http://www.fi.muni.cz/~xpodzim/git/?p=anaconda-addon-guide.git;a=summaryhttp://www.fi.muni.cz/~xpodzim/git/?p=hello-world-anaconda-addon.githttps://fedoraproject.org/wiki/Anaconda/NewInstaller -
8/13/2019 Anaconda DevConf 2013
26/26
,uestions?vpodzime/redhat-comanaconda0devel0list/redhat-com1anaconda / +reenode
2ontacts3
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
mailto:[email protected]:[email protected]://creativecommons.org/licenses/by/3.0/http://creativecommons.org/licenses/by/3.0/mailto:[email protected]:[email protected]