Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move pylib.yml to stage 4 #2368

Merged
merged 2 commits into from
Apr 28, 2020
Merged

move pylib.yml to stage 4 #2368

merged 2 commits into from
Apr 28, 2020

Conversation

jvonau
Copy link
Contributor

@jvonau jvonau commented Apr 27, 2020

enhances #2362 by not requiring a --reinstall to activate.

@holta holta added this to the 7.1 milestone Apr 27, 2020
@holta
Copy link
Member

holta commented Apr 27, 2020

Should all 3 of these...

  • iiab_const.py.j2
  • iiab_lib.py
  • iiab_env.py.j2

...move from roles/2-common/templates to roles/4-server-options/templates ?

Tangentially related to:

#2367 "vnStat playbook cannot be rerun on a VM w/o LAN? Is iiab-from-console.yml part of the issue?"

@tim-moody
Copy link
Contributor

sorry commented on the wrong pr.

if these files are moved to stage 4 how does that make it easier to update?

@holta
Copy link
Member

holta commented Apr 27, 2020

if these files are moved to stage 4 how does that make it easier to update?

When you click Admin Console (http://box.lan/admin) -> Configure -> ICO (Install Configured Options) Ansible starts at Stage 4...up to Stage 9...and the does the Network stage (equivalent to running ./iiab-network).

@holta
Copy link
Member

holta commented Apr 27, 2020

Should all 3 of these...

  • iiab_const.py.j2
  • iiab_lib.py
  • iiab_env.py.j2

...move from roles/2-common/templates to roles/4-server-options/templates ?

@jvonau mentions:

  • 4-server-options/templates can work, sure, but doesn't exist yet
  • He'd prefer to place all this logic into its own roles (e.g. roles/pylibs) which would then be invoked by 4-server-options/tasks/main.yml

@tim-moody
Copy link
Contributor

When you click Admin Console -> Configure -> ICO (Install Configured Options) it starts at Stage 4.

I guess that's true but how does it relate to my question, which was with respect to

enhances #2362 by not requiring a --reinstall to activate.

runroles 2-common does not require --reinstall and is probably faster

@jvonau
Copy link
Contributor Author

jvonau commented Apr 27, 2020

runroles 2-common does not require --reinstall and is probably faster

Don't think it would be faster as there are other functions in 2-common and in doing so does reset the stage counter when completed.

@tim-moody
Copy link
Contributor

tim-moody commented Apr 27, 2020

the only downside is if something needs one of these three files prior to stage 4

roles/pylibs/tasks/main.yml Outdated Show resolved Hide resolved
@jvonau
Copy link
Contributor Author

jvonau commented Apr 27, 2020

Nothing that would import iiab_lib.py or iiab_env.py.j2 is ever called in the iiab repo.

@tim-moody
Copy link
Contributor

Nothing that would import iiab_lib.py or iiab_env.py.j2 is ever called in the iiab repo

if that were true I would not have created iiab_lib.py and iiab_const.py

https://github.com/iiab/iiab/blob/master/roles/kiwix/templates/iiab-make-kiwix-lib3.py

But I think iiab_env.py.j2 is obsolete

@jvonau
Copy link
Contributor Author

jvonau commented Apr 27, 2020

Now as role one can just use runrole pylibs to test local changes while being able to update existing installs, should master change at some point, with ease.

@holta
Copy link
Member

holta commented Apr 28, 2020

Smoke-test is now running on 191-u20-srv-PR2368-BIG-0428 = 10.8.0.26, currently installing Stage 7...

@holta
Copy link
Member

holta commented Apr 28, 2020

Smoke-test is now running on 191-u20-srv-PR2368-BIG-0428 = 10.8.0.26, currently installing Stage 7...

Admin Console > Configure > "Save Configuration" and then "Install Configured Options" both worked unlike yesterdat, thanks also to PR #2349 which is now contained in this PR #2368.

FYI:

root@box:/etc/iiab# diff local_vars.yml.bkp local_vars.yml
374a375,404
>
>
> ############################################################################
> # IIAB -- following variables are first set by browser via the Admin Console
> #  They may be changed via text editor, or by the Admin Console.
>
> gui_desired_network_role: Appliance
> gui_static_wan: False
> gui_static_wan_ip: 192.168.0.191
> gui_static_wan_netmask: 255.255.255.0
> gui_static_wan_gateway: 192.168.0.1
> gui_static_wan_nameserver: 192.168.0.1
> use_cache: False
> adm_cons_force_ssl: False
> gw_squid_whitelist: False
> gw_block_https: False
> hostapd_enabled: True
> dokuwiki_enabled: False
> gui_desired_home_url: home
> xo_services_enabled: False
> ejabberd_enabled: False
> kalite_cron_enabled: False
> osm_enabled: False
> pathagar_enabled: False
> owncloud_enabled: False
> schooltool_enabled: False
> xovis_enabled: False
> xovis_chart_heading: undefined
> sugar_stats_enabled: False
> teamviewer_enabled: False

@holta holta merged commit c52f130 into iiab:master Apr 28, 2020
@jvonau
Copy link
Contributor Author

jvonau commented Apr 28, 2020

Nothing that would import iiab_lib.py or iiab_env.py.j2 is ever called in the iiab repo

if that were true I would not have created iiab_lib.py and iiab_const.py

https://github.com/iiab/iiab/blob/master/roles/kiwix/templates/iiab-make-kiwix-lib3.py

That is installed in kiwix's role but used by the cmdsrv and iiab-make-kiwix-lib is never run at any point from within iiab's repo.

But I think iiab_env.py.j2 is obsolete

I'll look to you & George to make that call and remove if required.

@tim-moody
Copy link
Contributor

That is installed in kiwix's role but used by the cmdsrv and iiab-make-kiwix-lib is never run at any point from within iiab's repo.

It allows kiwix to be used without admin console.

Smoke-test is now running on 191-u20-srv-PR2368-BIG-0428 = 10.8.0.26, currently installing Stage 7...

had this been done previously it would equally have solved the problem without this PR.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 28, 2020

That is installed in kiwix's role but used by the cmdsrv and iiab-make-kiwix-lib is never run at any point from within iiab's repo.

It allows kiwix to be used without admin console.

Agreed no issue there. We agree that iiab-make-kiwix-lib is available post-install for cmdline use, we differ on if it is used during install, and I can't seem to find where iiab-make-kiwix-lib is called.

@tim-moody
Copy link
Contributor

I thought it used to be run during the kiwix install, but I see that it is not.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 29, 2020

Would be nice if Save Configuration could be cleaned up as not to add services that are no longer supported and are commented out in both local_vars and default_vars from being append to the user's local_vars file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants