Skip to content

Commit

Permalink
Make forkliftci a submodule in our ci directory
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Mar 29, 2023
1 parent 6e30551 commit 77b6356
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ci/forkliftci"]
path = ci/forkliftci
url = https://github.com/kubev2v/forkliftci.git
92 changes: 92 additions & 0 deletions ci/README.forkliftci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# forkliftci

Git forkliftci submodule - the forkliftci repository is linked as a submodule for easy usage.

forkliftci is the backend forklift tools for creating and deploying forklift cluster infrastructure and running integration tests against it.

Ref: https://github.com/kubev2v/forkliftci

## Git submodule

forkliftci is a submodule, it's not part of the forklift-console-plugin code,
to get the code, use git `submodule` commands.

``` bash
# when cloning the project use recurse-submodules
git clone --recurse-submodules https://github.com/chaconinc/MainProject

# When updating to latest version
git submodule update --init --recursive
```

## Usage

``` bash
# Once - create a local nfs server
# NOTE - run only once to create a server
# require root permissions and create a server running on the local machine
sudo bash ./ci/forkliftci/cluster/providers/openstack/install_nfs.sh

# build a cluster with kubevirt-forklift and a set of demo providers using forkliftci
bash ./ci/deploy-all.sh --with-all-providers

# You can also install selected providers
# --with-ovirt-provider, --with-vmware-provider, --with-openstack-provider
bash ./ci/deploy-all.sh --with-ovirt-provider
```

# Providers info

## Ovirt

``` bash
OVIRT_USERNAME=admin@internal
OVIRT_PASSWORD=123456
OVIRT_URL=https://fakeovirt.konveyor-forklift.svc.cluster.local:30001/ovirt-engine/api
```

```
-----BEGIN CERTIFICATE-----
MIIDtzCCAp+gAwIBAgIUeHhXLiJJpaIld4tY7I5f8m7RjtwwDQYJKoZIhvcNAQEL
BQAwQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UE
CgwTRGVmYXVsdCB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uA+jWxShOL0zJFbMQDA0oxv6wnBxLIZXpQ
8dDsiipGN6HDZUpzxHGFDDPB7xtCFGjyLBXCLegh+31XnZ7w6AzY3mIBYw==
-----END CERTIFICATE-----
```

## vmWare

``` bash
[email protected]
VMWARE_PASSWORD=123456
VMWARE_URL=https://vcsim.konveyor-forklift.svc.cluster.local:8989/sdk
VDDK_IMAGE=quay.io/kubev2v/vddk-test-vmdk
VMWARE_FINGERPRINT=52:6C:4E:88:1D:78:AE:12:1C:F3:BB:6C:5B:F4:E2:82:86:A7:08:AF
```

## Openstack

``` bash
OPENSTACK_USERNAME=admin
OPENSTACK_PASSWORD='12e2f14739194a6c'
OPENSTACK_REGION_NAME=RegionOne
OPENSTACK_AUTH_URL=http://packstack.konveyor-forklift.svc.cluster.local:5000/v3
OPENSTACK_PROJECT_NAME=admin
OPENSTACK_USER_DOMAIN_NAME=Default
```
19 changes: 19 additions & 0 deletions ci/deploy-all-providers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail
script_dir=$(dirname "$0")

echo ""
echo "Install mock providers"
echo "======================"

# Setup NFS
# Uncomment for install NFS one time (requires sudo)
# ${script_dir}/forkliftci/cluster/providers/openstack/install_nfs.sh

export NFS_IP_ADDRESS=$(ip route get 8.8.8.8 | awk '{ print $7 }' | head -1)
export NFS_SHARE="/home/nfsshare"

bash ${script_dir}/deploy-ovirt-provider.sh
bash ${script_dir}/deploy-vmware-provider.sh
bash ${script_dir}/deploy-openstack-provider.sh
21 changes: 20 additions & 1 deletion ci/deploy-all.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail
script_dir=$(dirname "$0")
script_dir=$(realpath $(dirname "$0"))

export K8S_TIMEOUT="365s"

Expand Down Expand Up @@ -52,6 +52,25 @@ bash ${script_dir}/deploy-kubevirt.sh
# Install forklift
bash ${script_dir}/deploy-forklift.sh

# Install mock providers
if [[ $@ == *'--with-all-providers'* ]]; then
# make the submodule the current working direcotry for running the script
(cd ${script_dir}/forkliftci && bash ${script_dir}/deploy-providers.sh)
fi

if [[ $@ == *'--with-ovirt-provider'* ]]; then
# make the submodule the current working direcotry for running the script
(cd ${script_dir}/forkliftci && bash ${script_dir}/deploy-ovirt-provider.sh)
fi
if [[ $@ == *'--with-vmware-provider'* ]]; then
# make the submodule the current working direcotry for running the script
(cd ${script_dir}/forkliftci && bash ${script_dir}/deploy-vmware-provider.sh)
fi
if [[ $@ == *'--with-openstack-provider'* ]]; then
# make the submodule the current working direcotry for running the script
(cd ${script_dir}/forkliftci && bash ${script_dir}/deploy-openstack-provider.sh)
fi

# Print some help
# ---------------

Expand Down
19 changes: 19 additions & 0 deletions ci/deploy-openstack-provider.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail
script_dir=$(dirname "$0")

echo ""
echo "Install mock providers"
echo "======================"

# Setup NFS
# Uncomment for install NFS one time (requires sudo)
# ${script_dir}/forkliftci/cluster/providers/openstack/install_nfs.sh

export NFS_IP_ADDRESS=$(ip route get 8.8.8.8 | awk '{ print $7 }' | head -1)
export NFS_SHARE="/home/nfsshare"

# Deploy packstack + test-vm
bash ${script_dir}/forkliftci/cluster/providers/openstack/setup.sh
bash ${script_dir}/forkliftci/cluster/providers/openstack/create_test_vms.sh
18 changes: 18 additions & 0 deletions ci/deploy-ovirt-provider.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euo pipefail
script_dir=$(dirname "$0")

echo ""
echo "Install mock providers"
echo "======================"

# Setup NFS
# Uncomment for install NFS one time (requires sudo)
# ${script_dir}/forkliftci/cluster/providers/openstack/install_nfs.sh

export NFS_IP_ADDRESS=$(ip route get 8.8.8.8 | awk '{ print $7 }' | head -1)
export NFS_SHARE="/home/nfsshare"

# Deploy mock ovirt provider
bash ${script_dir}/forkliftci/cluster/providers/ovirt/setup.sh
18 changes: 18 additions & 0 deletions ci/deploy-vmware-provider.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euo pipefail
script_dir=$(dirname "$0")

echo ""
echo "Install mock providers"
echo "======================"

# Setup NFS
# Uncomment for install NFS one time (requires sudo)
# ${script_dir}/forkliftci/cluster/providers/openstack/install_nfs.sh

export NFS_IP_ADDRESS=$(ip route get 8.8.8.8 | awk '{ print $7 }' | head -1)
export NFS_SHARE="/home/nfsshare"

# Deploy mock vmware provider
bash ${script_dir}/forkliftci/cluster/providers/vmware/setup.sh
1 change: 1 addition & 0 deletions ci/forkliftci
Submodule forkliftci added at df7054

0 comments on commit 77b6356

Please sign in to comment.