canonical / deployment-configs

10 stars 12 forks source link

Snap up konf.py #342

Closed jpmartinspt closed 4 years ago

jpmartinspt commented 4 years ago

Done

Made konf.py a snap in preparation for us moving the configurations into each project repo.

QA

pmahnke commented 4 years ago

@jpmartinspt I am getting an error

snap install --devmode konf konf_0.1_amd64.snap
error: a single snap name is needed to specify mode or channel flags
jpmartinspt commented 4 years ago

@pmahnke fixed a couple things and updated the instructions.

jkfran commented 4 years ago

@jpmartinspt I am getting the following error:

$ snapcraft
[...]
Pulling konf-src 
Building konf-python 
Building konf-src 
Staging konf-python 
Staging konf-src 
Failed to copy '/root/parts/konf-src/install/templates': no such file or directory.
Check the path and try again.
jpmartinspt commented 4 years ago

@nottrobin I think it can't be strict because when we run konf staging site_config.yaml we will get a permission error while reading the site_config.yaml (not only in jenkins). Just swapped it to classic confinement and it seems to build and run fine so we might need to debug together @jkfran.

nottrobin commented 4 years ago

@jpmartinspt reading (and writing) of files in the home directory is definitely possible in strict confinement. You just need to add the home interface. You might also need to do a clean build - otherwise it will think nothing's changed since the previous build even though it has.

jpmartinspt commented 4 years ago

I've done a clean build with classic confinement, happy to explore the home interface path though, or let @jkfran takeover if he is keen in helping.