Skip to main content

Synchronize and manage multiple GitHub repositories

Project description

Persist and create build out environments in a nascent account

Travis CI Build Status

This program captures your home directory and synchronize it with another host using Git repo metadata, symbolic links and persisted files.

I wrote this because I couldn't find anything that creates repositories with the idea of having a portable and easy to recreate your home directory on another host. If I've reinvented the wheel, please let me know :)

More specifically: it persists and creates build out environments in a nascent account. The program memorizing a users home directory and building it out on another system. This is done by:

  1. Copying files, directories and git repos configuration.
  2. Creating a distribution compressed file.
  3. Uncompress on the destination system and create repos.

A future release will also synchronize and manage multiple GitHub repositories.

Table of Contents

Obtaining

The easist way to install the command line program is via the pip installer:

pip install zensols.grsync

Binaries are also available on pypi.

Usage

The program has two phases: freeze and thaw. Git repositories (URLs and configuration, not files), symbolic links (see caveat) and files are first froozen into a distribution zip.

This distribution file is then copied to the target machine that is to be configured with the user's home directory setup. The distribution also includes a bootstrap script that creates a Python virtual environment and then invokes the program to thaw the distributing.

  1. Install the grsync program.

  2. Decide what you want to transfer to the target system (see test configuration file). This file explains each section of the file with inline comments and should be sufficient to munge your own.

  3. Create the distribution, for example: grsync freeze -c grsync.yml -d ./dist.

  4. Copy the distribution zip file to the host, for example: scp -r ./dist ~/<somehost>

  5. Log into that host: slogin <host>

  6. Call the bootstrapper: cd ./dist && ./bootstrap.sh /usr/bin ./dist python3.6 This attempts to create the Python virtual environment, install the program dependencies and thaw the distribution.

    To do this step manually:

    1. Install the grsync program.
    2. Thaw the distribution on the target: grsync thaw -d ./dist

Repository Information

As you build your grsync.yml configuration file, it's helpful to see what repositories it's finding. This is you can do this with the repos and repoinfo, which show repositories, remotes, and indexed symbol links to or within the repositories.

Command Line Help

This information is given by the command line grsync -h, but repeated here for convenience:

Usage: usage: grsync <list|freeze|info|repoinfo|repos|thaw> [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -w NUMBER, --whine=NUMBER
                        add verbosity to logging
  -c FILE, --config=FILE
                        configuration file
Actions:
  freeze    Create a distribution
  -d, --distdir <string>                    the location of build out distribution
  --wheeldep <string>       zensols.grsync  used to create the wheel dep files

  info      Pretty print discovery information

  repoinfo  Get information on repositories
  -n, --name <string>                       comma spearated list of repo names

  repos     Output all repository top level info
  -f, --format <string>     {name}          format string (i.e. {name}: {path} ({remotes}))

  thaw      Build out a distribution
  -d, --distdir <string>                    the location of build out distribution
  -t, --targetdir <string>                  the location of build out target dir

Symbolic Links

As mentioned in the usage section, symbolic links pointing to any file in a repository are froozen, which means that integrity at thaw time is ensured. However, links not pointing to a repository are currently persisted, but the files and directories they point to are not.

A future release might have a follow symbolic links type functionality that allows this. However, for now, you must include both the link and the data it points to get this integrity.

Requirements

Changelog

An extensive changelog is available here.

License

Copyright (c) 2018 Paul Landes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zensols.grsync-0.0.8-py3.6.egg (36.7 kB view details)

Uploaded Egg

zensols.grsync-0.0.8-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file zensols.grsync-0.0.8-py3.6.egg.

File metadata

  • Download URL: zensols.grsync-0.0.8-py3.6.egg
  • Upload date:
  • Size: 36.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.8

File hashes

Hashes for zensols.grsync-0.0.8-py3.6.egg
Algorithm Hash digest
SHA256 57601cfec2693ff6b334d27b658a8f6470717828873e0ca9639e497eba56e5eb
MD5 f0e277aa61cd6bc8362dd67826c33700
BLAKE2b-256 8a8d200ef1c0544e403d07e5bd8e784ec9cb37973058d633b97fc536dea51e64

See more details on using hashes here.

File details

Details for the file zensols.grsync-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: zensols.grsync-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.8

File hashes

Hashes for zensols.grsync-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4dd40c0bd0430ec4eaf10a85c416090cc57bb79b4dd94d9f7d354652bf27bb88
MD5 2277cd8b7ad103dec91c80ef298f8ede
BLAKE2b-256 9eff66513499ca763cb42bd0eeead38e336a942aa3627c03a996eb18d30f1d34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page