Skip to content

Commit

Permalink
Merge pull request #1381 from yaacov/update-docs
Browse files Browse the repository at this point in the history
Add docs about local NFS, and inotify settings
  • Loading branch information
yaacov authored Nov 5, 2024
2 parents 9190dfb + 80bf5b6 commit 6dc1384
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ With a user logged in to existing Kubernetes or Openshift environment with Forkl
# set this variables if you use a different cluster.
export INVENTORY_SERVER_HOST=https://virt-konveyor-forklift.apps.<your cluster address>
export SERVICES_API_SERVER_HOST=https://virt-konveyor-forklift.apps.<your cluster address>
export CONSOLE_IMAGE=quay.io/openshift/origin-console:4.15
export CONSOLE_IMAGE=quay.io/openshift/origin-console:4.18

# Run the web console locally (uses the enviorment variables we defined above)
yarn console
Expand All @@ -58,6 +58,19 @@ yarn build
yarn start
```

#### How to find the cluster address

The cluster address will be the part of the address after the `apps.` or `api.` in the cluster services or API service address.

For example, if your cluter API address is `api.example.com:6443`, the cluster address will be `example.com`, and
the inventory service address will be:

``` bash
export INVENTORY_SERVER_HOST=https://virt-konveyor-forklift.apps.example.com
```

Note: use this method to find the inventory and services address when using an Openshift cluster, when using K8s use the inventory service address.

## Setup a local cluster for development

Forklift console plugin requires the user to be logged into an openshift or kubernetes cluster, if you do not have access to one, you can setup your own using [Openshift local]( https://developers.redhat.com/products/openshift-local/overview) or use the CI script to build a local [KinD](https://sigs.k8s.io/kind) cluster.
Expand Down
18 changes: 18 additions & 0 deletions docs/cli-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,21 @@ sudo install crc-linux-2.10.1-amd64/crc /usr/local/bin/crc
crc setup
crc start
```

## How to increase the inotify.max_user_watches and inotify.max_user_instances sysctls

When running the forklift development on local workstation machine, you may hit inotify limits.

To edit the `inotify` limits edit the file `/etc/sysctl.conf` and add the limits you need, for example:

```
# Add this lines to /etc/sysctl.conf
fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=8192
```

And then restart the service:

```bash
sudo sysctl -p
```
16 changes: 16 additions & 0 deletions docs/setup-local-nfs-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Local NFS server for forklift CI tasks

Some forklift CI tasks require an NFS server running on the localhost exporting the directory /home/nfsshare,
to set up this NFS server on fedora, see the bash example below:

``` bash
sudo dnf install nfs-utils -y

sudo mkdir -p /home/nfsshare
sudo chown -R nobody:nobody /home/nfsshare
sudo chmod 777 /home/nfsshare
sudo bash -c 'echo "/home/nfsshare *(insecure,rw,no_root_squash)" >>/etc/exports'
sudo exportfs -a

sudo systemctl restart nfs-server
```

0 comments on commit 6dc1384

Please sign in to comment.