Kiteco-public - Primary Kite repo — private bits replaced with XXXXXXX

Overview

This is a public version of the main Kite repo

The main Kite repo (originally kiteco/kiteco) was intended for private use. It has been lightly adapted for publication here by replacing private information with XXXXXXX. As a result many components here may not work out of the box.

Getting started with the codebase

Our codebase is primarily located at github.com/kiteco/kiteco (http://github.com/kiteco/kiteco). There are a few auxiliary repositories that host very experimental code, but the goal is to make the “kiteco” repository the point of truth for all of our services.

Summary (TL;DR)

  • Our codebase is primarily Go. (kite-go, kite-golib directories)
  • Infrastructure uses Terraform (for AWS) provisioning, and Fabric/shell scripts for deployment and management of remote hosts (devops directory)
  • You need VPN credentials to access any of our remote AWS (or Azure) hosts.
  • Platform-specific logic & instructions live in subdirectories osx, windows, linux. You probably don't need these.

Git LFS

We use Git LFS to store our various bindata.go files. You will need to install the command line tool to get the contents of those files when you pull the repository. Installation instructions are on their website, but for MacOS you can install it by running (from inside the kiteco repository)

brew update
brew install git-lfs
git lfs install

Then do a git pull to get the bindata.go files. If they do not download from LFS, try running git lfs pull (you should only need to do this once - subsequent git pulls should update the bindata correctly).

Optional: Improving Performance

git lfs install installs a smudge filter that automatically downloads and replaces the contents of newly checked out "pointer files" with their content. By default smudge filters operate on checked out blobs in sequence, so cannot download in batch as would typically happen when running git lfs pull. Furthermore, by default, git checkouts will block on downloading the new LFS files which can be annoying. You might prefer to disable the smudge filter (this can be run even if you've already run the regular git lfs install):

git lfs install --skip-smudge
git lfs pull

Then, when building after a new checkout, you may see an error of the form "expected package got ident." This occurs because go reads some Go files and sees the Git LFS pointers instead of the actual data file. At this point, you can download the latest files with git lfs pull and rebuilding should work.

Nothing needs to be done when pushing LFS blobs. That will still happen automatically.

Go

The bulk of our code is currently in Go. This can be found at github.com/kiteco/kiteco/kite-go (http://github.com/kiteco/kiteco/kite-go). To get started working in this part of the codebase, first make sure you have your Go environment setup correctly (i.e Go is installed, $GOPATH is set, etc.).

Locally, however, you will need to install Go 1.15.3. The following steps will get you going.

Set $GOPATH in your .profile / .bashrc/ .bash_profile / .zshrc, e.g:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Make sure to create these directories as well:

mkdir $HOME/go
mkdir $HOME/go/src $HOME/go/bin $HOME/go/pkg

If you are on a Mac and set the above in either .bashrc or .zshrc, make sure to load it in either your .profile or .bash_profile. See this for an explanation.

It would be useful to become familiar with how go code is organized. Check out https://golang.org/doc/code.html for more on this topic.

Navigate to where the kiteco repo will live in your GOPATH, and clone the repo.

# Create kiteco directory within GOPATH, and clone the repo there
mkdir -p ~/go/src/github.com/kiteco
cd ~/go/src/github.com/kiteco
git clone [email protected]:kiteco/kiteco

To install the latest version of Go that's compatible with our codebase, run:

cd ~/go/src/github.com/kiteco/kiteco
cd devops/scripts
./install-golang.sh

From here, just run make install-deps from the root of the kiteco repo to get basic utilities installed.

# Install dependencies
make install-deps

Use ./scripts/update-golang-version.sh if you'd like to make Kite require a newer version of Golang.

Tensorflow

For development builds (see below), you may need to have Tensorflow installed globally on your system.

make install-libtensorflow

Building Kite

You're now ready to build Kite! First, build the sidebar for your platform

./osx/build_electron.sh force
# ./linux/build_electron.sh force
# ./windows/build_electron.sh force

This process is asynchronous to the Kite daemon build, so you must manually rebuild the sidebar as needed.

Now build and run Kite:

make run-standalone

Note that this is not a full Kite build, but is the recommended approach for development, as it is much faster. Some functionality is disabled in the development build (depending on the platform):

  • Kite system tray icon
  • Updater service

Development

You should be able to develop, build, and test Kite entirely on your local machine. However, we do have cloud instances & VMs available for running larger jobs and for testing our cloud services

Dependency Management with Go Modules

We use the Go Modules system for dependency management.

General tips:

  • make sure in ~/go/src/github.com/kiteco/kiteco and not a symlink
  • make sure deps are updated to the versions in go.mod: go mod download
  • Set $GOPRIVATE in your .profile / .bashrc/ .bash_profile / .zshrc, e.g: export GOPRIVATE=github.com/kiteco/*.

To add or update a dependency, all you need to do is go get it, which will automatically update the go.mod and go.sum files. To remove a dependency, remove references to it in the code and run go mod tidy. In general, make sure to run go mod tidy to make sure all new dependencies have been added and unused ones have been removed before committing any dependency changes.

The process for updating a dependency is:

  • go get -u github.com/foo/bar
  • (optional) run any go command, such as go build, go test
  • go mod tidy
  • git add go.mod go.sum
  • git commit ...

The process for adding a dependency is:

  • go get github.com/foo/bar
  • edit code to import "github.com/foo/bar"
  • go mod tidy
  • git add go.mod go.sum
  • git commit ...

HTTPS Auth

godep may attempt to clone private repositories via HTTPS, requiring manual authentication. Instead, you can add the following section to your ~/.gitconfig in order to force SSH authentication:

[url "[email protected]:"]
	insteadOf = https://github.com/

Datasets, Datadeps

We bundle a lot of pre-computed datasets & machine learning models into the Kite app through the use of a custom filemap & encoding on top of go-bindata. The data, located in kite-go/client/datadeps, is kept in Git-LFS.

All needed data files is first stored on S3. There are pointers at various places in our codebase to S3 URIs. After updating references to these datasets, the datadeps file must be manually rebuilt:

$ ./scripts/build_datadeps.sh

This will bundle all data that is loaded at Kite initialization time. You must ensure the needed data is loaded at initialization, otherwise it will not be included!

Logs

Some logs are displayed in Xcode, but most are written to a log file:

tail -F ~/.kite/logs/client.log

Testing and Continuous Integration

Your Go code should pass several quality criteria before being allowed into the master branch. Travis CI (https://travis-ci.org/) acts as the gatekeeper between pull requests and merging. You can test your code before pushing to a pull request to speed up the process by navigating to the kite-go directory and running make * commands directly (any of make (fmt|lint|vet|bin-check|build|test)).

VPN Access

You will need access to our VPN to connect to our backend hosts.

  • Get VPN credentials (*.ovpn file) from @tarak (You will need to type in a password IRL - don't IM/chat it)
  • Install Tunnelblick for OS X (https://code.google.com/p/tunnelblick/)
  • Double click on the “.ovpn” file that contains your credentials.
  • Tunnelblick should automatically apply the configuration.. look for the icon on the OS X status bar
  • Click on the Tunnelblick icon, select your config, and enter your VPN password. (NOTE: Tunnelblick will complain saying the IP hasn't changed. Check the box to disable the message and continue.)
  • Ping 'test-0.kite.com' and make sure it resolves. It's okay if the pings timeout; ICMP is disabled by default on aws instances.

SSH Access

Kite's Dropbox has ssh credentials for all the machines on AWS and Azure under Shared > Engineering > keys > kite-dev.pem and Shared > Engineering > keys > kite-dev-azure. Place both of these in your .ssh directory, i.e. ~/.ssh/kite-dev.pem. As a convenience, you should add the following to your ~/.ssh/config:

Host *.kite.com
    ForwardAgent yes
    IdentityFile ~/.ssh/kite-dev.pem
    User ubuntu

# Test instances are on Azure
Host test-*.kite.com
    User ubuntu
    IdentityFile ~/.ssh/kite-dev-azure

Don't forget to set appropriate permissions on the credential files (e.g. 700)

You might also like...
Xk6-crypto-x509 - A k6 extension to encrypt data with a PEM Public Key

xk6-crypto-x509 A k6 extension to encrypt data with a PEM Public Key This is a k

This repo is some SDK of Binance

Binance API Go Language SDK This is a Binance Go language sdk that uses a method similar to HuobiRDCenter/huobi_Golang Official Documents Please make

Golang-demo - A repo for app golang-demo; bootstrapped by DevStream

golang-demo This is a repo for app golang-demo; bootstrapped by DevStream. By de

Hexagonal architecture paradigms, such as dividing adapters into primary (driver) and secondary (driven)Hexagonal architecture paradigms, such as dividing adapters into primary (driver) and secondary (driven)

authorizer Architecture In this project, I tried to apply hexagonal architecture paradigms, such as dividing adapters into primary (driver) and second

cli tools for list all pages in logseq repo, marked with public or private

logseq-pages A cli tool for list all pages in logseq repo, marked with public or private. When I using logseq to build my knowledge base and publish p

Find in Go repeated strings that could be replaced by a constant

goconst Find repeated strings that could be replaced by a constant. Motivation There are obvious benefits to using constants instead of repeating stri

Tiny go package for fetching high and low value of a stock for any given period range using kite connect historical data APIs.

Tiny go package for fetching high and low value of stock for any given period range using Kite connect Historical data APIs.

rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org     account access, and private resources.
rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.

rpCheckup - Catch AWS resource policy backdoors like Endgame rpCheckup is an AWS resource policy security checkup tool that identifies public, externa

Managing your Kubernetes clusters (including public, private, edge, etc) as easily as visiting the Internet

Clusternet Managing Your Clusters (including public, private, hybrid, edge, etc) as easily as Visiting the Internet. Clusternet (Cluster Internet) is

Public key derivator for ECDSA (without knowledge of the private key)

A proof of concept of a public key derivation for ECDSA (without knowledge of the private key) It is a demonstration of how to implement a simple key

Mass download all github repositories(public & private) of an organization, ideally in a few seconds.

Git Mass Mass download all github repositories(public & private) of an organization, ideally in a few seconds. Writing this as a simple bash script wo

Wrapper around bufcli to make it do cross-repo compiles for private repos and use full paths.
Wrapper around bufcli to make it do cross-repo compiles for private repos and use full paths.

Bufme A tool for compiling protos with full directory paths and cross repo compiles. Introduction Protocol buffers rock, but protoc should die in a fi

A simple memory database. It's nothing but a homework to learn primary datastruct of golang.

A simple memory database. It's nothing but a homework to learn primary datastruct of golang.

The primary place where Optimism works on stuff related to Optimistic Ethereum
The primary place where Optimism works on stuff related to Optimistic Ethereum

The Optimism Monorepo TL;DR This is the primary place where Optimism works on stuff related to Optimistic Ethereum. Documentation Extensive documentat

Automatically map wacom tablets area to your primary X output.

xsetwacom-auto Simple CLI tool that uses xsetwacom and xrandr to: map the to one monitor set the tablet area to match the aspect ratio of the monitor

Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

A public facing version of the Chicago data microservices repo.

chicago-data | full stack reporting solution Project Overview This repo houses microservices dedicated to ingesting and preparing open Chicago dataset

A repo for making my first public golang moduel.

demoMod My first public Golang moduel Packages Two very simple packages. First is converter that converts the NOK - USD or BP. Using the current excha

A test repo to demonstrate the current (go1.17.2) issue when trying to use retractA test repo to demonstrate the current (go1.17.2) issue when trying to use retract

test-go-mod-retract This is a test repo to demonstrate the current (go1.17.2) issue when trying to use retract in go.mod to retract a version in a non

Comments
  • open-source-derived data storage

    open-source-derived data storage

    From the readme:

    By the way, we are happy to share any of our open-source-derived data. Our Github crawl is about 20 TB, but for the most part the intermediate and final pipeline outputs are pretty reasonably-sized. Although please let me know soon if you want anything because we will likely end up archiving all of this.

    Could you reach out to the Internet Archive about storing data like those? It would be a shame to lose them.

    opened by Fire- 1
  • Is it not possible to install the Kite Engine on CentOS 7?

    Is it not possible to install the Kite Engine on CentOS 7?

    Runing bash <(curl -sL https://linux.kite.com/dls/linux/current) this results in the output below:

    Sorry! This installer is not compatible with CentOS 7 and earlier due to incomplete systemd support. See https://bugzilla.redhat.com/show_bug.cgi?id=1173278 for details. Exiting now.

    Does this mean CentOS 7 users can't use Kite? Is there a possibility this problem will be handled in the near future?

    opened by baranaldemir 0
  • can't download kite-installer when I run the script

    can't download kite-installer when I run the script

    image There wil occur such a error when I follow the instructions in the links:https://github.com/kiteco/kiteco-public/releases/tag/2021-06-10,so is there any steps I haven't down,please give me some advice

    opened by Hezhexi2002 0
  • Kite PyCharm plugin support

    Kite PyCharm plugin support

    Is there a way to add Kite PyCharm plugin support as currently there is none. When trying to install PyCharm plugin via the Kite desktop app, I get an error stating that the URL (for the plugin) is not found.

    unexpected HTTP status for url https://plugins.jetbrains.com/pluginManager/?action=download&build=PY-221.5080.212&id=com.kite.intellij&uuid=4ed0fc1826f3ddd90077af9380a4144c: 404 / 404 Not Found

    opened by Piirtola 0
Releases(2021-06-10)
Owner
Kite
Kite
A public facing version of the Chicago data microservices repo.

chicago-data | full stack reporting solution Project Overview This repo houses microservices dedicated to ingesting and preparing open Chicago dataset

Courtney Perigo 1 Jun 22, 2022
Split and distribute your private keys securely amongst untrusted network

cocert An experimental tool for splitting and distributing your private keys safely* cocert, generates ECDSA - P521 key and uses a technique known as

Furkan Türkal 189 Dec 5, 2022
Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private.

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private. Arbitrum interoperates closely with Ethereum, so Ethereum developers can easily cross-compile their contracts to run on Arbitrum. Arbitrum achieves these goals through a unique combination of incentives, network protocol design, and virtual machine architecture.

Offchain Labs 1k Jan 8, 2023
Proving possession of private data using KZG-Polynomial Commitments.

data proof Copyright (c) 2021 George Carder [email protected] GENERAL PUBLIC LICENSE Version 3 // proof of concept // not efficient, optimized,

George Carder 1 Nov 26, 2021
Private Terraform Provider Registry For Golang

private-reggie Private Terraform Provider Registry Test With curl $ curl http://localhost:8080/terraform/providers/v1/hashicorp/hashicups/versions ht

Adam as a Service 0 Dec 13, 2021
Monero: the secure, private, untraceable cryptocurrency

Monero Copyright (c) 2014-2021 The Monero Project. Portions Copyright (c) 2012-2013 The Cryptonote developers. Table of Contents Development resources

The Monero Project 7.5k Jan 2, 2023
Go implementation of a vanity attempt to generate Bitcoin private keys and subsequently checking whether the corresponding Bitcoin address has a non-zero balance.

vanity-BTC-miner Go implementation of a vanity attempt to generate Bitcoin private keys and subsequently checking whether the corresponding Bitcoin ad

Lih Ingabo 1 Jun 3, 2022
EtherGuess - Crack Ethereum account private key

EtherGuess This program generates random Ethereum private keys and check for acc

lhxsimon 1 Jun 6, 2022
ConsenSys Software 9 Jan 7, 2023
generate a chia address by public key, chia公钥生成地址

chia-address-generator This repo is a hack way to generate an address from publicKey. So it's not a good enough way to use it in prod, use it just for

chuwt 3 Mar 9, 2022