|
1 | 1 | # Custom Resource Abstraction Fabrication Tool |
2 | 2 |
|
3 | | -__NOTE__: For users of CRAFT, a detailed documentation can be found [here](). This README is primarily aimed for developers. |
| 3 | +For new users of CRAFT, a detailed documentation can be found [here](https://salesforce.github.io/craft). |
4 | 4 |
|
5 | 5 | ## Contribution |
6 | 6 | Please refer [Contribution.md](Contribution.md) before pushing the code. If you wish to make a contribution, create a branch, push your code into the branch and create a PR. For more details, check [this article](https://opensource.com/article/19/7/create-pull-request-github). |
7 | 7 |
|
8 | 8 | ## Installing craft and its dependencies |
9 | 9 | Dependencies for CRAFT are `kustomize` and `kubebuilder`. |
10 | 10 |
|
11 | | -Latest CRAFT release can be found [here](). Download the craft.tar.gz file and run the following command: |
12 | 11 |
|
13 | 12 | ``` |
14 | | -sudo tar -C /usr/local/ -xzf ~/Downloads/craft.tar.gz |
15 | | -export PATH=$PATH:/usr/local/craft/bin |
16 | | -``` |
17 | | - |
18 | | -In case the file is downloaded somewhere other than Downloads, replace ~/Downloads/craft.tar.gz by the path where you downloaded the file. |
19 | | - |
20 | | -## Commands of CRAFT |
21 | | -### craft version |
22 | | -Usage : |
23 | | -``` |
24 | | -craft version |
25 | | -``` |
26 | | -Displays the information about craft, namely version, revision, build user, build date & time, go version. |
27 | | - |
28 | | -### craft init |
29 | | -Usage : |
30 | | -``` |
31 | | -craft init |
32 | | -``` |
33 | | -Initialises a new project with sample controller.json and resource.json |
34 | | - |
35 | | -### craft create |
36 | | -Usage : |
37 | | -``` |
38 | | -craft create -c "controller.json" -r "resource.json --podDockerFile "dockerFile" -p |
39 | | -``` |
40 | | -Creates operator source code in $GOPATH/src, builds operator.yaml, builds and pushes operator and resource docker images. |
41 | | - |
42 | | -#### craft build |
43 | | -Has 3 sub commands, code, deploy and image. |
| 13 | +# dowload latest craft binary from releases and extract |
| 14 | +curl -L https://github.com/salesforce/craft/releases/download/0.1.7/craft.tar.gz | tar -xz -C /tmp/ |
44 | 15 |
|
45 | | -#### build code |
46 | | -Usage: |
47 | | -``` |
48 | | -craft build code -c "controller.json" -r "resource.json |
49 | | -``` |
50 | | -Creates code in $GOPATH/src/operator. |
51 | | - |
52 | | -#### build deploy |
53 | | -Usage: |
54 | | -``` |
55 | | -craft build deploy -c "controller.json" -r "resource.json |
56 | | -``` |
57 | | -Builds operator.yaml for deployment onto cluster. |
58 | | - |
59 | | -#### build image |
60 | | -Usage: |
61 | | -``` |
62 | | -craft build image -b -c "controller.json" --podDockerFile "dockerFile" |
63 | | -``` |
64 | | -Builds operator and resource docker images. |
65 | | - |
66 | | -#### validate |
67 | | -Usage: |
68 | | -``` |
69 | | -craft validate -v "operator.yaml" |
| 16 | +# move to a path that you can use for long term |
| 17 | +sudo mv /tmp/craft /usr/local/craft |
| 18 | +export PATH=$PATH:/usr/local/craft/bin |
70 | 19 | ``` |
71 | | -Validates operator.yaml to see if everything is in shape |
| 20 | +## CRAFT Usage |
| 21 | +To know more about how to use craft cli you can refer to [here](https://salesforce.github.io/craft/craft_cli.html) |
0 commit comments