ElpisSolar / hslu-presentation

https://elpissolar.github.io/hslu-presentation/
MIT License
0 stars 0 forks source link

Tracking changes & building site through resin #1

Closed samkellerhals closed 5 years ago

samkellerhals commented 5 years ago

I've started working on the e-book reader and am hoping to have a first fully working prototype ready by mid-novemeber.

Can we set up Dockerfile.template in the resin-internet-mirror repo to build this website ?

Also we would have to add a simple version tracking file in that repo as well to trigger future builds.

What do you think?

discordianfish commented 5 years ago

I'd say we should do two things:

samkellerhals commented 5 years ago

Sounds good, where/how do we start?

I have to admit this is slightly beyond me but I am keen to try to help as much as I can!

discordianfish commented 5 years ago

Phew this was painful.. But I've got automated building with circleci setup. Now each commit to the master branch will automatically update the gh-pages branch and https://elpissolar.github.io/digital-hub/

Note: This means you shouldn't manually push to the gh-pages branch anymore. And ideally you'd also work on a separate branch whenever you want to do bigger changes. Then merge the branch when you're happy, which only then triggers the update of the actual site. That prevents updating it with only half-working things etc.

So this part is done. The remaining bit is integrating this into the resin project. I'll look into that next when I find some time.

samkellerhals commented 5 years ago

Just had a look at your commits, a big thank you from my side ! (If you are interested and have time I would also be super curious to understand a bit more of the logic/methodology of the approach you took using circleci).

Meanwhile:

discordianfish commented 5 years ago

@samkellerhals I've added the last revision from gh-pages to the rpi project. Haven't tested it though.

In general we need to figure out what to do about updates of the existing rpis: If we push any changes to the existing resin (now called 'balena apparently') repo, it would trigger an update to the existing rpis when/if they come online again.

Do we want that? Or should we rather create a new application in belena for the new batch of rpis?

Beside that, what gutenberg scrape script are we talking about? Is it just downloading files from gutenberg or actually "scraping" (which is less reliable and should be avoided). Either way, we need to figure out when to actually download/scrape. We could download them manually and push them to this repo or do it as part of the Dockerfile (probably makes more sense).

samkellerhals commented 5 years ago

@discordianfish Thanks a lot !

I've now added the final changes as well for now. What is happening in the foreseeable future (around 10th of December) is that there is going to be an exhibition in Luzern, Switzerland where we will be showing the unit as well as the digital platform. So for that they have asked us to upload some interactive materials etc. which I have now done if you check out the latest merge into master, so that is really the focus right now - no need to download all of Project Gutenberg yet etc. I will figure out a way to do that later.

What I really need help with is just setting up the continuous integration - e.g. making sure that changes to master are actually deployed to gh-pages so that the site is updated, and finally to make sure this can be served from the Raspberry Pis.

Regarding pushing changes to the repo yes we can go ahead and push it to the existing repository since the RPis we used are unlikely to come online again given that there were problems with 3G connectivity in those refugee camps (that's why they went offline) and we've thus stopped paying for monthly data costs.

And yes I agree with you that downloading is the better option but let's not worry about this straightaway. I will give it a try and will share with you what I manage to come up with - for now let's:

-push changes to the resin repo -check why circleci builds are failing and not being commited to gh-pages

discordianfish commented 5 years ago

@samkellerhals I've fixed the build, so now (again) every thing you change should be reflected on https://elpissolar.github.io/digital-hub/

To update the RPIs you'd:

Once you're ready to add more content/ebooks/videos, let's discuss how. We should not add them to this repo here.

samkellerhals commented 5 years ago

@discordianfish OK thank you for the info - I will try to do that and set up the pis that way.

Also, I just made a small change to master to test whether https://elpissolar.github.io/digital-hub would update, but it still hasn't, have I done something wrong?

Regarding future content yes I'll keep you in the loop on that! It is likely that in the next few days I will be adding just a marginal amount ahead of the showcase, but will then get rid of it again afterwards so we can focus on the content that will actually be useful to people in camps.

samkellerhals commented 5 years ago

@discordianfish I've pushed our latest changes to balena and updated a device (it will stay connected indefinitely for development in the next 2 weeks until the exhibition).

This is it's public URL: https://08fb6c072ea12e8df4476f0773e1698e.balena-devices.com/

The problem is somehow the digital-hub site as built in this repository doesn't show properly.

I think I found it by going to: https://08fb6c072ea12e8df4476f0773e1698e.balena-devices.com/www/digital-hub/index.html

The end-goal of this thread now (then I'll close this issue) is now to just:

discordianfish commented 5 years ago

@samkellerhals:

So this should work now.

For updating the RPI with changes in digital-hub, you'd:

Let me know if there is still something unclear. You should be able to do this on your own.

samkellerhals commented 5 years ago

@discordianfish thank you Johannes, works like a charm!

I will keep you updated on any future developments.