uboslinux / ubos-tools

UBOS development/deployment tools
7 stars 0 forks source link

Use rsync over ssh instead of scp for upload in ubos-push #18

Closed jernst closed 7 years ago

jernst commented 8 years ago

This makes partial uploads more efficient.

rahulraghu94 commented 8 years ago

Hello!,

I'd like to work on this.

jernst commented 8 years ago

Welcome! Go right ahead! Suggest you set up a development machine per http://ubos.net/docs/developers/setting-up-development-machine.html and ubos-push into a UBOS container as described there for testing, or into a spare PC/RPi running UBOS.

rahulraghu94 commented 8 years ago

Hi there! I'm fairly new to this, and i was hoping for some off handed help.

I was just going through the getting started guide. I already have Manjaro installed on my laptop. Manjaro is sort of an easy-to-use Arch distro. It's pretty much the same apart from coming with a UI, more stable kernel releases etc.

I was looking to run UBOS through a vagrant box but couldn't find one. Is it possible to run, modify and test it over Docker? I'm planning on pulling Ubos-yellow, as suggested on the getting started guide.

jernst commented 8 years ago

Your choices: http://ubos.net/docs/users/installation.html. For development, I recommend a systemd-nspawn container, it's easiest. yellow is fine for UBOS use; recommend red for UBOS development itself.

rahulraghu94 commented 8 years ago

I apologise for the delay.

Ya, systemd-nspawn turned out to be the simplest way to install it. Docker gets stuck after pulling ubos-red. I also tried packaging the .vmdk box into a vagrant box but it fails as well. Finally resorted to systemd-nspawn

jernst commented 8 years ago

If any of what you experienced with docker/vagrant looks like a problem on our end, could you please feel relevant bugs so things that need fixing can get fixed.

rahulraghu94 commented 8 years ago

I'll raise a new issue with it soon. If I fine useful logs, I'll attach them as well :D

May also I suggest adding documentation or examples to ubos-tools?

jernst commented 8 years ago

Of course. ubos-docs is the project with the docs. Pull requests preferred :-)

rahulraghu94 commented 8 years ago

I shall issue a pull request with the documentation soon. The issue in question is what i would like to focus on right now. I'm having a bit of a hard time figuring out how exactly ubos-tools are used. More so as to how ubos-push is used

jernst commented 8 years ago

The repo ubos-tools is just a collection of tools. All of them are available on UBOS, and some of them are available in a separate repository for Arch hosts so it's a bit easier to develop for UBOS on Arch. Which is which is defined here: https://github.com/uboslinux/ubos-buildconfig -- these are the definitions for the repos that UBOS and Arch reference. ubos-push is a bit unusual for UBOS in that it lets you hot-deploy a new package to a host without going through a regular UBOS upgrade cycle via pacman -Syu. This is useful for development, and for devops-like deployment.

rahulraghu94 commented 8 years ago

So from what I understand, I would use ubos-push on my development environment to push projects on to a remote ubos machine, right? I'm attempting to push some trivial files from my local machine to a ubos machine that I spawned using systemd-nspawn. The script is failing since I do not have certain ubos perl packages, namely UBOS::logging and UBOS:Utils. I've tried looking for them, but can't seem to find then!

jernst commented 8 years ago

If fails on the host I presume? You are likely missing the Arch tools for UBOS: http://ubos.net/docs/developers/install-ubos-tools.html

rahulraghu94 commented 8 years ago

Yes, UBOS tools hadn't installed correctly. I apologize for all the questions!

I'm attempting to run ubos-push but I'm unable to move past the command that connects via SSH.

./ubos-push --verbose --host 10.0.0.2 cmatrix root@10.0.0.2's password:

I have no idea what the root password is. I've tried changing sshd config in the container, tried using new keys, even tried creating a new user to use, but I can't get past this.

What might I be doing wrong?

jernst commented 8 years ago

if you look at the script, it is attempting to log into the UBOS device as shepherd. Did you set up a shepherd account e.g. with UBOS staff? If you run UBOS in a container, ubos-admin setup-shepherd makes that easy, but that's not on yellow yet only on red and only on a few platforms (will be part of beta9, out shortly) Actually, where does the root come from? The script as I know it uses shepherd.