Skip to content
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Tell circle to use bin instead of dist Jun 8, 2018
.github Comment out the PR template message Oct 26, 2017
calicoctl Add VXLANMODE to IP pools output. Apr 15, 2019
git-hooks Update git hook to police repo location. Nov 4, 2016
report
test-data Update libcalico to include VXLAN Apr 5, 2019
tests Add VXLANMODE to IP pools output. Apr 15, 2019
.dockerignore Update Makefile and fix static checks Jun 6, 2018
.fossa.yml Add foss checks to makefile Dec 19, 2018
.gitignore Enable junit reports and write to report directory Sep 14, 2018
CONTRIBUTING.md Update contributing Dec 22, 2016
Dockerfile Cross-compile cleanup Apr 20, 2018
Dockerfile.amd64 Image: Update to alpine 3.8 Jul 25, 2018
Dockerfile.arm64 Image: Update to alpine 3.8 Jul 25, 2018
Dockerfile.ppc64le Image: Update to alpine 3.8 Jul 25, 2018
Dockerfile.s390x Image: Update to alpine 3.8 Jul 25, 2018
LICENSE Master merge Jun 19, 2015
Makefile clean out go-pkg-cache during Apr 4, 2019
README.md Add NetworkSets resource Mar 11, 2019
RELEASING.md Cleanup RELEASING.md Jun 14, 2018
glide.lock Automated libcalico pin update Apr 24, 2019
glide.yaml Automated libcalico pin update Apr 24, 2019
install-git-hooks Initial commit of golang version of libcalico, calicoctl. Nov 4, 2016

README.md

Build Status CircleCI branch

Slack Status IRC Channel

calicoctl

This repository is the home of calicoctl.

Note that the documentation in this repo is targeted at Calico contributors.

Documentation for Calico users is here:
https://docs.projectcalico.org

For information on calicoctl usage, see the calicoctl reference information

Developing

Print useful actions with make help.

Building calicoctl

There are two ways to build calicoctl: natively, and dockerized

Dockerized Builds

For simplicity, calicoctl can be built in a Docker container, eliminating the need for any dependencies in your host developer environment, using the following command:

make build

The binary will be put in ./dist/ and named calicoctl-<os>-<arch>, e.g.:

$ ls -1 ./dist/
calicoctl-linux-amd64
calicoctl-linux-arm64
calicoctl-linux-ppc64le
calicoctl-linux-s390x
calicoctl-darwin-amd64
calicoctl-windows-amd64.exe

To build for a different OS or ARCH, simply define it as a var to make, e.g.:

$ make build ARCH=arm64
$ make build OS=darwin ARCH=amd64

To list all possible targets, run make help.

Native Builds
  1. Assuming you have already installed go version 1.7.1+, ensure you've cloned this repository into your Go project path.

    git clone https://github.com/projectcalico/calicoctl.git $GOPATH/src/github.com/projectcalico/calicoctl
    
  2. Install Glide.

  3. Populate the vendor/ directory in the project's root with this project's dependencies:

    glide install -strip-vendor
    
  4. Build the binary:

    make build
    

Tests

Tests can be run in a container to ensure all build dependencies are met.

To run the tests

make test

Note: Tests depend on the test image calico/test, which is available only on amd64. The actual image used as set by the make variable TEST_CONTAINER_NAME. If you have a local build of that image or one for a different architecture, you can override it by setting the variable, e.g.:

$ make test TEST_CONTAINER_NAME=some/container:tag
You can’t perform that action at this time.