github.com/codefresh-io/kcfi@v0.0.0-20230301195427-c1578715cc46/README.md (about)

     1  # `kcfi` - Codefresh Installer for Kubernetes  
     2  
     3  ### Download
     4  https://github.com/codefresh-io/kcfi/releases
     5  
     6  ### Usage
     7  Create configuration directory
     8  ```
     9  kcfi init <product> [-d /path/to/stage-dir]
    10  ```
    11  Edit configuration in config.yaml and deploy to Kubernetes
    12  ```
    13  kcfi deploy [ -c config.yaml ] [ --kube-context <kube-context-name> ] [ --atomic ] [ --debug ] [ helm upgrade parameters ]
    14  ```
    15  
    16  ### Example - Codefresh onprem installation
    17  ```
    18  kcfi init codefresh
    19  ```
    20  It creates `codefresh` directory with config.yaml and other files
    21  
    22  - Edit `codefresh/config.yaml` - set global.appUrl and other parameters  
    23  - Set docker registry credentials - obtain sa.json from Codefesh or set your private registry address and credentials  
    24  - Set tls certifcates (optional) - set tls.selfSigned=false put ssl.crt and private.key into certs/ directory 
    25  - For Openshift uncomment `include: ["values/openshift.yaml"]` in config.yaml
    26  
    27  Deploy Codefresh
    28  ```
    29  kcfi deploy -c codefresh/config.yaml [ --kube-context <kube-context-name> ] [ --atomic ] [ --debug ] [ helm upgrade parameters ]
    30  ```
    31  
    32  ### Separate database infrastructure chart
    33  By default Codefresh installation includes persistent services (mongo, postgres, redis, rabbitmq). You can optionally install them as separate chart by setting dbinfra.enabled=true in config.yaml :
    34  ```yaml
    35  dbinfra:
    36    enabled: true
    37   #storageClass: nfs-with-backup
    38  ```
    39  You can also specify storageClass and other chart values.  
    40  This is preferable option for installation on Openshift  
    41  
    42  ### Registering external docker nodes
    43  Edit [codefresh-stage-dir/addons/external-nodes/config.yaml](stage/addons/external-nodes/config.yaml) to set node addresses  
    44  ```yaml
    45  metadata:
    46    kind: helmChart
    47    installer:
    48      type: helm
    49      helm:
    50        chart: external-nodes
    51        release: cf-external-nodes
    52  
    53  kubernetes:
    54    namespace: codefresh
    55    #context: 
    56    #kubeconfig:
    57  
    58  runtimeEnvironments:
    59    - name: default-nodes
    60      extends: system/default
    61      cluster: codefresh
    62      protocol: http
    63      #alternateLoggerConf: external-nodes
    64      nodes:
    65      - address: "172.31.128.95"
    66        name: node-1
    67        port: 4243
    68      - address: "172.31.128.96"
    69        name: node-2
    70        port: 4243
    71  ```
    72  
    73  Deploy nodes configuration by
    74  ```
    75  kcfi deploy -c codefresh/addons/external-nodes/config.yaml
    76  ```
    77  
    78  ### Openshift Routes
    79  Set `host` value in `codefresh-stage-dir/addons/openshift-routes/config.yaml` and deploy:  
    80  ```
    81  kcfi deploy -c codefresh/addons/openshift-routes/config.yaml --disable-openapi-validation
    82  ```
    83  
    84  ### Example - cf-k8s-agent installation
    85  1. Run `kcfi init k8s-agent`. A staging directory will be created named `k8s-agent` with config.yaml and other files.
    86  2. Edit `k8s-agent/config.yaml`.
    87  3. Run `/kcfi deploy -c k8s-agent/config.yaml -n your_namespace` standing on proper kube context.
    88  
    89  ### Uploading images to private registry in air-gapped environment
    90  (without access to public docker hub and codefresh-enterprise registry)
    91  ```
    92  Push whole release with images list defined in config file or by --image-list parameter:
    93     kcfi images push [--images-list <images-list-file>] [-c|--config /path/to/config.yaml] [options]
    94  
    95  Push single image
    96    kcfi images push [-c|--config /path/to/config.yaml] [options] repo/image:tag [repo/image:tag] ...
    97  
    98  Usage:
    99    kcfi images [flags]
   100  
   101  Aliases:
   102    images, image, private-registry, docker
   103  
   104  Flags:
   105        --codefresh-registry-secret string   file with Codefresh registry secret (sa.json)
   106    -c, --config string                      config file
   107    -h, --help                               help for images
   108        --images-list string                 file with list of images to push
   109        --password string                    registry password
   110        --registry string                    registry address
   111        --user string                        registry username
   112  ```
   113  
   114  ### Additional docs
   115  see in [docs](./docs) folder