github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.10.x/contributing/setup.md (about)

     1  # Setup for contributors
     2  
     3  ## General requirements
     4  
     5  First, go through the general [Local Installation Instructions](https://docs.pachyderm.com/latest/getting_started/local_installation/). Additionally, make sure you have the following installed:
     6  
     7  - golang 1.12+
     8  - docker
     9  - [jq](https://stedolan.github.io/jq/)
    10  - [pv](http://ivarch.com/programs/pv.shtml)
    11  
    12  ## Bash helpers
    13  
    14  To stay up to date, we recommend doing the following.
    15  
    16  First clone the code:
    17  (Note, as of 07/11/19 pachyderm is using go modules and recommends cloning the code outside of the $GOPATH, we use the location ~/workspace as an example, but the code can live anywhere)
    18  
    19      cd ~/workspace
    20      git clone git@github.com:pachyderm/pachyderm
    21  
    22  Then update your `~/.bash_profile` by adding the line:
    23  
    24      source ~/workspace/pachyderm/etc/contributing/bash_helpers
    25  
    26  And you'll stay up to date!
    27  
    28  ## Special macOS configuration
    29  
    30  ### File descriptor limit
    31  
    32  If you're running tests locally, you'll need to up your file descriptor limit. To do this, first setup a LaunchDaemon to up the limit with sudo privileges:
    33  
    34      sudo cp ~/workspace/pachyderm/etc/contributing/com.apple.launchd.limit.plist /Library/LaunchDaemons/
    35  
    36  Once you restart, this will take effect. To see the limits, run:
    37  
    38      launchctl limit maxfiles
    39  
    40  Before the change is in place you'll see something like `256    unlimited`. After the change you'll see a much bigger number in the first field. This ups the system wide limit, but you'll also need to set a per-process limit.
    41  
    42  Second, up the per process limit by adding something like this to your `~/.bash_profile` :
    43  
    44      ulimit -n 12288
    45  
    46  Unfortunately, even after setting that limit it never seems to report the updated version. So if you try
    47  
    48      ulimit
    49  
    50  And just see `unlimited`, don't worry, it took effect.
    51  
    52  To make sure all of these settings are working, you can test that you have the proper setup by running:
    53  
    54      make test-pfs-server
    55  
    56  If this fails with a timeout, you'll probably also see 'too many files' type of errors. If that test passes, you're all good!
    57  
    58  ### Timeout helper
    59  
    60  You'll need the `timeout` utility to run the `make launch` task. To install on mac, do:
    61  
    62      brew install coreutils
    63  
    64  And then make sure to prepend the following to your path:
    65  
    66      PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
    67  
    68  ## Dev cluster
    69  
    70  Now launch the dev cluster: `make launch-dev-vm`.
    71  
    72  And check it's status: `kubectl get all`.
    73  
    74  ## pachctl
    75  
    76  This will install the dev version of `pachctl`:
    77  
    78  ```
    79      cd ~/workspace/pachyderm
    80      make install
    81      pachctl version
    82  ```
    83  
    84  And make sure that `$GOPATH/bin` is on your `$PATH` somewhere
    85  
    86  ## Fully resetting
    87  
    88  Instead of running the makefile targets to re-compile `pachctl` and redeploy
    89  a dev cluster, we have a script that you can use to fully reset your pachyderm
    90  environment:
    91  
    92  1) All existing cluster data is deleted
    93  2) If possible, the virtual machine that the cluster is running on is wiped
    94  out
    95  3) `pachctl` is recompiled
    96  4) The dev cluster is re-deployed
    97  
    98  This reset is a bit more time consuming than running one-off Makefile targets,
    99  but comprehensively ensures that the cluster is in its expected state, and is
   100  especially helpful when you're first getting started with contributions and
   101  don't yet have a complete intuition on the various ways a cluster may get in
   102  an unexpected state. It's been tested on docker for mac and minikube, but
   103  likely works in other kubernetes environments as well.
   104  
   105  To run it, simply call `./etc/reset.py` from the pachyderm repo root.