Categorygithub.com/redhatcre/syncron
modulepackage
1.0.0
Repository: https://github.com/redhatcre/syncron.git
Documentation: pkg.go.dev

# README

cgapp logo

Syncron

Usage Patterns all in one cli based application written in Golang.

GoProject GoReport License

🔧 Installation

  • Download and install Go.

    Follow the link for instructions 🔔 Please note: version 1.18 or higher required

  • Clone this repository.

    git clone [email protected]:RedHatCRE/syncron.git

  • Navigate to local cloned repository folder and install Syncron with:

    go install

  • Check that Syncron has been properly installed on your environment by running

    syncron -v syncron version 1.0.0

    • Make sure your gopath is added to your path

      export PATH=$PATH:$(go env GOPATH)/bin

📖 Setup

To use Syncron, two important steps must be taken.

  • Create configuration file.

    • Important information about config:
      • Yaml based

      • Path: ~/.config/

      • Naming: syncron.yaml

      • A minimal syncron configuration file is as follows:

        s3:
          endpoint: "<endpoint>"
          region: "<region>"
          bucket: "<name of bucket to pull from>"
        prefix: "<targeted keys starting path>"
        downloadDir: "<path where files will be downloaded>"
        
  • For downloading files from a AWS buckets, proper credentials must be present on running machine. Two options:

    • Credentials file at $HOME/.aws/credentials

      • The credentials file has the following format:

        [default]
        aws_access_key_id = "XXXXXXX"
        aws_secret_access_key = "XXXXXXX"
        
    • Environment variables must be set:

      • export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
      • export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

⚙️ Commands & Options

The user is given several flags to pick which time frame to pull data from.

Download files
OptionDescriptionTypeRequired?
downloadDownload files.stringNo
syncron download [option] [--flag] [number]
--flagDescriptionTypeDefaultRequired?
daysDownload files from the past x days.int2No
monthsDownload files from the past x months.int0No
yearsDownload files from the past x years.int0No
filterFilter files to download[]str[]str{}No
OptionDescriptionTypeDefaultRequired?
sosreportsDownload sosreports files.stringsosreportsYes
Read parquet files
syncron read-parquet [--flag] [option]
OptionDescriptionTypeRequired?
read-parquetRead local parquet files.stringNo
--flagDescriptionTypeDefaultRequired?
fileWhat file to read.str-Yes
outputPath to place unpacked file.strYes
Query data from database
syncron queries

⚠️ License

Syncron is free and open-source software licensed under the Apache 2.0 License.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author