Hi,
I’ve installed a rolling image some days ago. If I’d like to use the latest rolling release how should I proceed without loosing the actual configuration?
thanks
Please have a look at [Update VyOS — VyOS 1.5.x (circinus) documentation], especially the section ‘Example’. You can get the latest rolling release by executing add system image latest
.
I receive an error no 16
That method indeed doesn’t work anymore. One does need a script for it now, see Static URL for VyOS rolling nightly build? - #2 by Apachez .
Since I don’t use VRFs I removed all VRF related stuff plus now curl has to follow redirections because github made some changes. For me the following script works:
/conf/custom/update.sh
:
#!/bin/vbash
# Include VyOS functions
source /opt/vyatta/etc/functions/script-template
# Script debugging
#set -x
# Set variables
URL=$(curl -Ls "https://api.github.com/repos/vyos/vyos-rolling-nightly-builds/releases/latest" | grep browser_download_url | head -n 1 | cut -d\" -f4)
# Perform stuff
run add system image ${URL}
It should work, that sounds like a bug - having a glance at the code, while the image download uses the provided VRF, the update URL request does not. Wrapping the add system
in an ip vrf exec
does fix that problem, but it should do it properly. I’ll raise a ticket for that later.
Of course, you do also need to set a valid update URL even without the involvement of VRFs. It is not set by default. I just pointed it at https://raw.githubusercontent.com/vyos/vyos-nightly-build/refs/heads/current/version.json
for testing.
Thanks @talmakion that URL does indeed work (for me without a VRF). I did set the URL to a few different URLs (mentioned in the documenation) which didnt’ work.
This one should work if you dont have any VRFs configured:
#!/bin/vbash
# Include VyOS functions
source /opt/vyatta/etc/functions/script-template
# Script debugging
#set -x
# Set variables
#read -p "Enter path to update-file: " URL
#URL=https://s3-us.vyos.io/rolling/current/vyos-rolling-latest.iso
URL=$(curl -Ls "https://api.github.com/repos/vyos/vyos-rolling-nightly-builds/releases/latest" | grep browser_download_url | head -n 1 | cut -d\" -f4)
# Perform stuff
run add system image ${URL}
Other than that I think also this should work even if you dont have any VRFs configured:
#!/bin/vbash
# Include VyOS functions
source /opt/vyatta/etc/functions/script-template
# Script debugging
#set -x
# Set variables
VRF=default
#read -p "Enter path to update-file: " URL
#URL=https://s3-us.vyos.io/rolling/current/vyos-rolling-latest.iso
URL=$(ip vrf exec ${VRF} curl -Ls "https://api.github.com/repos/vyos/vyos-rolling-nightly-builds/releases/latest" | grep browser_download_url | head -n 1 | cut -d\" -f4)
# Perform stuff
run add system image ${URL} vrf ${VRF}
I dont recall if its called “default”, “Default” or just “main” as in MIkrotik.
Also good catch to add -L to the curl-request so it follows any redirects made by the web-server.
Thanks @Apachez the URL does indeed work, I tried before adding -L
to curl
, maybe that solved it.
There is no VRF defined in my case, neiter default
, nor Default
nor main
worked. I did have to remove all the VRF parts.
excuse me but I am not able to follow yours tips.
I’ve done the update. I had to set DNS server
Yeah you need a DNS server configured in order to resolve a FQDN into an IP-address to connect to
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.