Control Plane Migration Assistance: Intended to help migration cluster configuration of a OCP 3.x cluster to OCP 4.x
Requires go >= v1.11
This project is Go Modules for managing dependencies. This means it can be
cloned and compiled outside of GOPATH
.
$ git checkout https://github.com/fusor/cpma.git
$ cd cpma
$ make
$ ./bin/cpma
Commands:
tranform Generates configuration from an Openshift 3 cluster for use on an Openshift 4
report Generates a report explaining what Openshift 3 configuration can be recreated on Openshift 4
Flags:
--config string config file (default is $HOME/.cpma.yaml)
--debug show debug output
-h, --help help for cpma
-o, --output-dir string set the directory to store extracted configuration.
You can find example config in examples/
Example:
$ ./bin/cpma transform --config /path/to/config/.yml --debug
The data file structure looks like the following tree structure example. The cluster endpoints subfolders contain the configuration files retrieved and to process. The manifests directory contains the generated CRDs.
data
├── manifests
├── master-0.example.com
| └── etc
| └── origin
| ├── master
| ├── htpasswd
| └── master-config.yaml
└── node-1.example.com
└── etc
└── origin
└── node
└── node-config.yaml
The configuration files are retrieved from local disk (outputDir/<Hostname>/
),
If a file is not available it's retrieved from <Hostname>
and stored on local disk.
To trigger a total or partial network file fetch, remove any prior data from
<Hostname>
sub directory.
In order to add new unit test bundle create *_test.go
file in package you
want to test(ex: foo.go
, foo_test.go
). To execute tests run make test
.