docs/get-started.md: Stop discussing snappy-tools. #454

Merged
merged 8 commits into from Apr 29, 2016

Conversation

Projects
None yet
5 participants
Member

kyrofa commented Apr 14, 2016

Remove any mention of snappy-remote, snappy-tools, snappy-debug, and other old Snappy things. This fixes LP: #1568113.

docs/debug.md
-installed via `sudo snappy install snapname.snap`.
+This is called "sideloading" and it can be done by copying the snap onto the
+Snappy system via `scp` and installing it with
+`sudo snappy install snapname.snap`.
@dholbach

dholbach Apr 15, 2016

Contributor

sudo snap install <local-file.snap> maybe?

docs/get-started.md
-write new software for a snappy-based system easily.
+Ubuntu is an excellent OS for developers. The Snappy developer tools are
+readily available in Ubuntu, so porting and writing new software to target a
+Snappy-based system is particularly easy.
@dholbach

dholbach Apr 15, 2016

Contributor

Snap-based? Ubuntu Core-based?

@kyrofa

kyrofa Apr 29, 2016

Member

Went with "Snap-based."

docs/ros-snap.md
-You can transfer your newly-minted .snap to your Ubuntu Core machine and install
-it at the same time via `snappy-remote`, for example:
+Transfer your newly-minted .snap to your Ubuntu Core machine with `scp`,
+then install it:
@dholbach

dholbach Apr 15, 2016

Contributor

Wouldn't sideloading on a local machine with snapd installed be much easier?

@kyrofa

kyrofa Apr 15, 2016

Member

Heck I don't even know how to do that 😛 .

@dholbach

dholbach Apr 15, 2016

Contributor

sudo apt install snapd; sudo snap install ubuntu-core; sudo snap install <local-file.snap>

@kyrofa

kyrofa Apr 15, 2016

Member

Ah, that sounds very desktop-specific. I guess we need to come up with documentation that works for both now, eh?

@kyrofa

kyrofa Apr 15, 2016

Member

Or should we? Should we just assume people are running snaps on the desktop now?

@dholbach

dholbach Apr 18, 2016

Contributor

Hohum... why desktop specific? This would work on a server or vm as well.

@kyrofa

kyrofa Apr 29, 2016

Member

Yeah I was comparing it to Snappy Ubuntu Core, but I'm good with it.

docs/ros-snap.md
- $ snappy-remote --url=ssh://<host>:<port> install \
- ros-example_1.0_amd64.snap
+ $ sudo snappy install ros-example_1.0_amd64.snap
@dholbach

dholbach Apr 15, 2016

Contributor

sudo snap install ...

@kyrofa

kyrofa Apr 29, 2016

Member

Fixed.

docs/ros-snap.md
-binary you requested, called `ros-example.launch-project`. Test it
-out:
+While on the Ubuntu Core machine, take a look in `/snaps/bin/`, and you'll see
+the binary you requested, called `ros-example.launch-project`. Test it out:
@dholbach

dholbach Apr 15, 2016

Contributor

Isn't /snap the current now?

@kyrofa

kyrofa Apr 15, 2016

Member

Not on snappy edge... but then again, they've been working on the desktop recently and haven't updated edge in a while, so I don't know. The snappy command still works there as well, so I'll hold off on this until edge is updated enough for me to know what's valid and what's not.

@dholbach

dholbach Apr 18, 2016

Contributor

It should be snap, can you try again with snapd 2.0?

@kyrofa

kyrofa Apr 29, 2016

Member

Yeah, it'll be that way soon in Ubuntu Core, so done.

docs/snapcraft-usage.md
- snappy-remote --url ssh://192.168.10.10 install downloader_1.0_amd64.snap
+ $ scp downloader_1.0_amd64.snap ubuntu@192.168.10.10:
@dholbach

dholbach Apr 15, 2016

Contributor

Same as above.

docs/snapcraft-usage.md
-After installing a summary of installed snaps will be presented, on vanilla
+ $ sudo snappy install downloader_1.0_amd64.snap --allow-unauthenticated
+
@dholbach

dholbach Apr 15, 2016

Contributor

Same as above.

docs/debug.md
-installed via `sudo snappy install snapname.snap`.
+This is called "sideloading" and it can be done by copying the snap onto the
+Snappy system via `scp` and installing it with
+`sudo snappy install snapname.snap`.
Note that you have to use the `--allow-unauthenticated` tag for installing
@caldav

caldav Apr 15, 2016

--allow-unauthenticated is gone with the new snap command.

docs/debug.md
-installed via `sudo snappy install snapname.snap`.
+This is called "sideloading" and it can be done by copying the snap onto the
+Snappy system via `scp` and installing it with
+`sudo snappy install snapname.snap`.
Note that you have to use the `--allow-unauthenticated` tag for installing
unsigned snaps: `sudo snappy install --allow-unauthenticated snapname.snap`.

kyrofa added some commits Apr 14, 2016

docs/get-started.md: Stop discussing snappy-tools.
Also just generally update it in preparation for 16.04. Also remove any
mention of snappy-remote or snappy-tools from the other documentation.

LP: #1568113

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Move away from snappy logs and other unsupported things.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
docs/ros-snap.md: Use the snap command.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
docs/snapcraft-usage.md: Use the snap command.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
docs/debug.md
@@ -11,7 +11,7 @@ following command:
```
$ sudo -s
# ulimit -c unlimited
-# echo "/home/ubuntu/apps/hello-world.canonical/1.0.18/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+# echo "/home/ubuntu/snap/hello-world.canonical/1.0.18/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
@sergiusens

sergiusens Apr 29, 2016

Collaborator

s|/home/ubuntu|$HOME|

@sergiusens

sergiusens Apr 29, 2016

Collaborator

oh, ic, sudo tee as well in the pipe and echo as a normal user ;-)

ulimit -c unlimited can be done as a user iirc.

@elopio

elopio Apr 29, 2016

Member

I think the path is not 1.0.18, but a sequential identifier.
IMO, we are missing a snapcraft command that gives us the path to a snap data dir. Roight now, I'm not sure how to fix this particular case.

@kyrofa

kyrofa Apr 29, 2016

Member

I think the path is not 1.0.18, but a sequential identifier.

Indeed-- I guess I can just <revision> here.

@kyrofa

kyrofa Apr 29, 2016

Member

Done on both.

docs/debug.md
@@ -33,7 +33,7 @@ You can customize the core dump pattern with the following options
There is a debug snap that can be installed with:
- $ sudo snappy install snappy-debug
+ $ sudo snap install snappy-debug
@sergiusens

sergiusens Apr 29, 2016

Collaborator

Remove all references to snappy-debug. It is broken.

@sergiusens

sergiusens Apr 29, 2016

Collaborator

So basically just leave the two last paragraphs in this section

This document will explain...

and

The reason...

@kyrofa

kyrofa Apr 29, 2016

Member

But it'll be back eventually, right? We'll have to add all this back in at that point.

@elopio

elopio Apr 29, 2016

Member

I'll just leave the note here that this is not yet working:
https://bugs.launchpad.net/snappy/+bug/1543118
I don't think it's necessary to remove it from the docs, at least not yet because I hope we'll get it back soon.

@sergiusens

sergiusens Apr 29, 2016

Collaborator

Yeah, but it may not be in the form of a snap; so this should ideally be removed, it is a VCS after all and we can recover it ;-)

@kyrofa

kyrofa Apr 29, 2016

Member

Sounds good.

docs/debug.md
-Alternatively the snap can be copied via scp into the Snappy system and
-installed via `sudo snappy install snapname.snap`.
+In order to test a new snap on a Snap-based system you need to install it first.
+This is called "sideloading" and it can be done with:
@sergiusens

sergiusens Apr 29, 2016

Collaborator

Installing a snap is not called sideloading, installing a snap from a local storage/store is ;-)

@kyrofa

kyrofa Apr 29, 2016

Member

Alright, I tried to clarify with the latest push.

docs/debug.md
@@ -165,8 +154,8 @@ on disk will be called `pastebinit.pastebinit`.
### Find a binary in the file system hierarchy
-All binary names can be found in `/snaps/bin/`. The snappy tool will generate
-small wrapper script that ensures that the binary in the snap is called with
+All binary names can be found in `/snaps/bin/`. The `snap` tool will generate
@sergiusens

sergiusens Apr 29, 2016

Collaborator

s|/snaps/bin|/snap/bin

docs/debug.md
-All binary names can be found in `/snaps/bin/`. The snappy tool will generate
-small wrapper script that ensures that the binary in the snap is called with
+All binary names can be found in `/snaps/bin/`. The `snap` tool will generate
+a small wrapper script that ensures that the binary in the snap is called with
@sergiusens

sergiusens Apr 29, 2016

Collaborator

instead of wrapper script I'd call it launcher script

docs/debug.md
+command can be used to see if the service starts and runs as expected, for
+example:
+
+ systemctl status snap.<name>.<service>
@sergiusens

sergiusens Apr 29, 2016

Collaborator

No appname in the unit file?

@kyrofa

kyrofa Apr 29, 2016

Member

That's what I meant by <service>, but yeah, <appname> might be better.

-service status". To inspect the logs run "snappy service logs". Both commands
-can take a snap name to limit to a specific snap (e.g. for the service
-in `shout.sergiusens` run: `sudo snappy service logs shout`).
-
@elopio

elopio Apr 29, 2016

Member

Following @sergiusens request, I reported the bug here: https://bugs.launchpad.net/snapcraft/+bug/1576775
I'm going to link this PR so we can easily revert this change later.

-`snappy service status` command can be used to see if the service starts and
-runs as expected. The `snappy service logs` command is available to inspect
-the messages that the service send to `stdout`/`stderr`.
+To test a service it must be installed first. See the section "Testing a binary"
@elopio

elopio Apr 29, 2016

Member

What about a link to the section?

@kyrofa

kyrofa Apr 29, 2016

Member

I'd rather not-- it stretches markdown and I'm worried the automatic import will barf on it.

docs/debug.md
-runs as expected. The `snappy service logs` command is available to inspect
-the messages that the service send to `stdout`/`stderr`.
+To test a service it must be installed first. See the section "Testing a binary"
+for the various ways to do that. Once it is installed systemd's `systemctl`
@elopio

elopio Apr 29, 2016

Member

you are missing a comma in there. Once it is installed ...

docs/debug.md
- so the `setuid`/`setgid` and `chown` family of syscalls are blocked (since
- there is no appropriate user to change to. Optionally assigning
- users/groups to snaps is a planned feature). For example,
+ 16 does not provide a mechanism of assigning users and groups to snaps, so the
@elopio

elopio Apr 29, 2016

Member

I think it should be: a mechanism FOR assigning. But I might be wrong, it's your language, not mine :)

@kyrofa

kyrofa Apr 29, 2016

Member

Haha, you're right, though I didn't write this anyway ;) .

docs/debug.md
-and install the new one. Eg, after adding the `network-service` cap:
+`network-bind` in our 'plugs' in the yaml. At this point, you could simply
+add it to the `plugs` for that service, rebuild the snap, remove the old snap
+and install the new one. Eg, after adding the `network-bind` interface:
docs/debug.md
-working (and if working on custom policy, copying this back to your packaging
-files).
+For simple things like forgetting an interface, rebuilding and reinstalling the
+snap is enough. Other times you might be developing custom policy for a
@elopio

elopio Apr 29, 2016

Member

developing A custom policy...

@kyrofa

kyrofa Apr 29, 2016

Member

Blown away instead!

Member

elopio commented Apr 29, 2016

I'm leaving my +1 here. I just made some minor comments, most of them ignorable and some might be wrong because English is hard.
My only concern is the path to the snap data dir. In the busybox example test we did an ugly hack to find the name of the dir with $(ls ~/snap/snap-name)

kyrofa added some commits Apr 29, 2016

docs: Stop mentioning snappy-debug.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Use <appname> instead of <service>
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Fix a few more typos.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Member

elopio commented Apr 29, 2016

I insist on my 👍

@sergiusens sergiusens merged commit 943c8c1 into snapcore:master Apr 29, 2016

2 of 4 checks passed

Examples tests Started
Details
autopkgtest Started
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 96.171%
Details

@kyrofa kyrofa deleted the kyrofa:bugfix/1568113/outdated_get_started branch Oct 14, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

docs/get-started.md: Stop discussing snappy-tools. (#454)
Also just generally update it in preparation for 16.04. Also remove any
mention of snappy-remote or snappy-tools from the other documentation.

LP: #1568113

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment