Beautiful and functional interface for snap management
JavaScript Go HTML Shell
Latest commit 1efe6d0 Jul 12, 2017 System Enablement CI Bot System Enablement CI Bot Open development for 0.26-11-dev
Permalink
Failed to load latest commit information.
.snapcraft Build snaps on commits to master and publish on the edge channel (#105) Nov 30, 2016
avahi Refactor avahi & cert code for better test coverage (#169) Feb 21, 2017
cmd Using shutdown interface on snapd. (#216) Apr 11, 2017
pkg Using shutdown interface on snapd. (#216) Apr 11, 2017
scripts Snapcraft and Launchpad build support (#182) Mar 21, 2017
snappy updating local networks available in device if a request is denied (#231 Jul 11, 2017
spread Using shutdown interface on snapd. (#216) Apr 11, 2017
statetracker Remove the 'remove' button from home snap card; fix alignment in snap… ( Apr 6, 2017
tests fix selenium tests (#230) Apr 7, 2017
www Using shutdown interface on snapd. (#216) Apr 11, 2017
.ci_tests_disabled Armhf ui build (#235) Jul 11, 2017
.dockerignore Stabilize CI process (#153) Feb 15, 2017
.gitignore Remove ubuntu-personal-store from tree (#226) Apr 4, 2017
.jscsrc Adjustment to .jscsrc (#97) Feb 9, 2017
.tarmac.sh Adding testing facilities May 3, 2015
.travis.yml Js tests back to green (#232) Jul 10, 2017
COPYING Common copyright headers and COPYING file May 3, 2015
ChangeLog Update ChangeLog for 0.26-10 Jul 12, 2017
Dockerfile Stabilize CI process (#153) Feb 15, 2017
MAINTAINERS Armhf ui build (#235) Jul 11, 2017
README.md Prompt for admin password upon opening UPS (#217) Mar 29, 2017
booth-demo-manager.def booth demo manager definition (#158) Feb 15, 2017
build.sh Remove ubuntu-personal-store from tree (#226) Apr 4, 2017
dependencies.tsv Better layout and timezone handling for date/time settings (#133) Jan 24, 2017
gen-coverage.sh Add go coverage reporting Jun 16, 2016
gulpfile.js Remove extra CSS handling (#225) Apr 4, 2017
id_rsa_snapwebci.enc encrypt ssh key for master branch Nov 17, 2016
karma.conf.js updating local networks available in device if a request is denied (#231 Jul 11, 2017
package.json Fix ui (#234) Jul 11, 2017
run-checks added extra information to run_checks when gofmt fails (#212) Mar 22, 2017
run-spread-tests.sh spread test infrastructure, and initial installation test (#119) Jan 18, 2017
snapcraft.yaml Open development for 0.26-11-dev Jul 12, 2017
spread.yaml spread test infrastructure, and initial installation test (#119) Jan 18, 2017

README.md

Build Status Coverage Status

Building

Prerequisites

This assumes you have a working go environment with a GOPATH env var setup, and nodejs and npm installed:

sudo apt install nodejs-legacy npm snapcraft bzr

Install global npm modules without sudo:

cat > ~/.npmrc <<-EOF
root = $HOME/node/lib/node_modules
prefix = $HOME/node
binroot = $HOME/node/bin
manroot = $HOME/node/man
EOF

Setup the environment:

mkdir ~/node
export PATH=$PATH:$HOME/node/bin:$GOPATH/bin
export NODE_PATH=$HOME/node/lib/node_modules

Branch:

mkdir -p $GOPATH/src/github.com/snapcore
cd $GOPATH/src/github.com/snapcore
git clone git@github.com:snapcore/snapweb.git
cd snapweb

Install:

# this script does a npm install using yarn and fixes some extra issues
# with dependencies
./scripts/npm-install.sh
./scripts/get-go-deps.sh

Building

cd $GOPATH/src/github.com/snapcore/snapweb
# omit the architecture specified below ('amd64') to build for all architectures at once
./build.sh amd64

Installing

Once you have a snap built locally, you can test it on your system by doing:

 snap install snapweb_<version>.snap --dangerous

The --dangerous flag is necessary for installing locally built snaps, which have not been signed by the store.

Using

Connect to the Snapweb interface with this URL: [http://localhost:4200/]

Snapweb will automatically redirect to HTTPS on port 4201, using a self-signed certificate.

Warning : if testing snapweb inside a VM with redirected ports, be sure to connect directly to the HTTPS socket, as the HTTP redirect won't work.

For example, starting a VM with:

 kvm -m 768 -redir :8022::22 -redir :8201::4201 -hda snappy.img

Point the browser directly to [https://localhost:8201]

Note that in all cases you will now need an access token to use snapweb. Depending on where you installed the snap package (locally or in a vm) run the following command (possibly via ssh in the case of a vm):

 sudo snapweb.generate-token

Then copy/paste the token in the Web UI when requested.

API

/api/v2/packages/

To install a package:

 curl -H "Content-Type: application/json" -d '{"package":"xkcd-webserver"}' http://localhost:4200/api/v2/packages/

To uninstall a package:

curl -X DELETE http://localhost:4200/api/v2/packages/xkcd-webserver

To list packages:

 curl http://localhost:4200/api/v2/packages/

To get a specific package:

 curl http://localhost:4200/api/v2/packages/xkcd-webserver

Dependencies handling

To generate dependencies.tsv you need godeps, so

go get launchpad.net/godeps

To obtain the correct dependencies for the project, run:

godeps -t -u dependencies.tsv

If the dependencies need updating

godeps -t ./... > dependencies.tsv