github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/scripts/create-testdata/Readme.md (about)

     1  # How to set up test data
     2  
     3  To set up kuberpult, you need a manifest repo.
     4  For local testing, you can create one with
     5  `git init --bare`
     6  It's important that this directory is called `repository_remote`
     7  and is directly under `services/cd-service`.
     8  
     9  Bare repositories are good for kuberpult, but not daily work.
    10  You can check this repo out like this:
    11  `git clone ../path/to/repo`
    12  
    13  You now have a repo.
    14  you still need to fill it with some basic data:
    15  environments and releases.
    16  For environments, ensure that kuberpult is running (use the docker-compose file),
    17  and then run `./create-environments.sh` to create environments. This defaults to the 
    18  environments inside tesdata_template/environments, but you can also provide your own
    19  environments and respective configurations by running `./create-environments.sh /path/to/envs`
    20  
    21  For releases, ensure kuberpult is running (use the docker-compose file),
    22  and then run `./create-release.sh my-service my-team` to create releases
    23  and then run both `./run-releasetrain.sh staging`  and `./run-releasetrain.sh fakeprod` so that the release shows up in the UI under staging and fakeprod.
    24  All remaining operations should be easily doable via the UI.
    25  
    26  If you still need to call a kuberpult grpc endpoint directly, you can use evans:
    27  
    28  `evans --host localhost --port 8443 -r`
    29  
    30  Then type `service DeployService` and `call Deploy` for example.
    31  
    32  ### Add tags to the repository
    33  
    34  In order to test some of the features for Kuberpult you will need to add tags to the manifest repo. To do this, within the manifest repo run the command: `git tag <name of tag> && git push --tags`
    35  To see more useful data with the tag, create some dummy deployments prior to creating the tag. Once the dummy deployments are done, pull the latest changes to your local manifest repo then create the tag.
    36  
    37  
    38  ### Why "fakeprod"?
    39  We want to make it as clear as possible that this is testdata.
    40  We therefore recommend to have no "prod" environment locally.