balena-os / balena-engine

Moby-based Container Engine for Embedded, IoT, and Edge uses
https://www.balena.io
Apache License 2.0
687 stars 66 forks source link

https://balena.io/engine/install.sh still installs 17.12 version of balena-engine #183

Open imrehg opened 5 years ago

imrehg commented 5 years ago

When using https://balena.io/engine/install.sh | sh to install the engine, one gets this engine:

greg@debianengine:/mnt/balena$ sudo balena-engine version
Client:
 Version:   v17.12.0
 API version:   1.35
 Go version:    go1.10.4
 Git commit:    3fdfd0d
 Built: Wed Oct 17 15:42:29 2018
 OS/Arch:   linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:  v17.12.0
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.10.4
  Git commit:   3fdfd0d
  Built:    Wed Oct 17 15:42:29 2018
  OS/Arch:  linux/amd64
  Experimental: false

The latest one is v18.9.9, I believe, so there's a lot we could bump, if it works, obviously.

robertgzr commented 5 years ago

The install.sh script still points to 17.12 but I don't think changing it there will update the marketing site as that is not automatically deployed to the gh-pages branch.

I think moving to balenaCI #172 is one blocker for that... Then we could also change it to always pull the latest tagged release.

roman-mazur commented 5 years ago

The install.sh dowloaded from the site is actually here. We can update the version there for now (as a quick and dirty fix).

robertgzr commented 5 years ago

@roman-mazur good to know! Is the data on the gh-pages branch used at all right now, are there plans to use it eventualy?

cc @dimitrisnl

roman-mazur commented 5 years ago

The guys are working on landr which will allow to create websites directly from the main repo - that when it's ready, we'll have engine site resources directly in this repo.

And for now, everything accessible at balena.io is is in that repo. Merging to master triggers a deploy there.

dimitrisnl commented 5 years ago
#!/bin/sh

tag="v17.12.0"
tag=$(echo "$tag" | sed 's|+|.|g')

machine=$(uname -m)

case "$machine" in
    "armv5"*)
        arch="armv5"
        ;;
    "armv6"*)
        arch="armv6"
        ;;
    "armv7"*)
        arch="armv7"
        ;;
    "armv8"*)
        arch="aarch64"
        ;;
    "aarch64"*)
        arch="aarch64"
        ;;
    "i386")
        arch="i386"
        ;;
    "i686")
        arch="i386"
        ;;
    "x86_64")
        arch="x86_64"
        ;;
    *)
        echo "Unknown machine type: $machine"
        exit 1
esac

url="https://github.com/balena-os/balena-engine/releases/download/${tag}/balena-engine-${tag}-${arch}.tar.gz"

curl -sL "$url" | sudo tar xzv -C /usr/local/bin --strip-components=1

cat <<EOF

   Installation successful!
 _           _
| |__   __ _| | ___ _ __   __ _
| '_ \\ / _\` | |/ _ \\ '_ \ / _\` |
| |_) | (_| | |  __/ | | | (_| |
|_.__/ \__,_|_|\___|_| |_|\__,_|

the container engine for the IoT
EOF

This is the script, Should just updating the tag work?

robertgzr commented 5 years ago

I will PR an update to the current script and then send one that updates the website.

robertgzr commented 5 years ago

I don't like that bumping the script will increase the current balena-engine version... Personally I would like to include this change in the balenaCI PR #126 because after that we can have it automatically increase with every merge (because we will have builds for every tagged version)

I'm not sure if we should make the change to v18.9.7 (which is the latest release with binaries) just in the website repo and not here though.

cc @roman-mazur @dimitrisnl

roman-mazur commented 5 years ago

@robertgzr to update the site, only the resin-site PR is needed

And a quick suggestion: once the automatic releases creation is implemented, we could change the installation script to accept the version as an input paramter. Then the website app can make an API call to github to get the latest version and generate instruction

install.sh <latest fetched from github>
jellyfish-bot commented 3 years ago

[mtoman] This issue has attached support thread https://jel.ly.fish/932bc9fe-e389-46e3-91b3-46f485e60d5a

iamsolankiamit commented 2 years ago

@robertgzr does updating the version on the site fix the issue for now?

robertgzr commented 2 years ago

@iamsolankiamit the problem is that we currently don't build binaries for each release as part of the engine ci pipeline. we decided that we would rather move to transformers, than put more effort into the current system. until that is done this is stuck...