Git Product home page Git Product logo

channelserver's Introduction

channelserver

This project is a micro-service for exposing multiple release channels for a software project. It is inspired by (and follows the convention of) GitHub’s /releases/latest paradigm, which will always redirect to the latest release of a project.

It expands on the /releases/latest concept by allowing you to create multiple release channels, each with their own URL that will redirect to the latest release for that channel.

A channel's latest release can be configured by explicitly pinning it to a version or by selecting a set of releases via regular expression (in which case the most recently release matching the regex will be resolved as the latest release). For more examples, see the sample config.

The primary usecase for this project is currently Rancher's system-upgrade-controller, which is used for automating upgrades of k3s and k3os. In the system-upgrade-controller, a user can specify a channel exposed by this sevice as the URL in the plan.spec.channel field.

This service is in proudction for k3s here: https://update.k3s.io/v1-release/channels, which is driven by this config: https://github.com/rancher/k3s/blob/master/channel.yaml. Each channel's self link is the URL that will resolve to the latest GitHub release page for that channel.

Compile and Run

  1. build the binary
go build . 
  1. run the server
 ./channelserver --config-key k3s --path-prefix v1-release --channel-server-version v2.3.1
  1. run the following curl command or open the url in the browser
curl 0.0.0.0:8080/v1-release/release 
curl 0.0.0.0:8080/v1-release/channel 
curl 0.0.0.0:8080/v1-release/appdefault

License

Copyright (c) 2020 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

channelserver's People

Contributors

ibuildthecloud avatar oats87 avatar jiaqiluo avatar monzelmasry avatar rmweir avatar matttrach avatar superseb avatar dramich avatar davidnuzik avatar thedadams avatar snasovich avatar niusmallnan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.