-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap-devel.sh
executable file
·213 lines (205 loc) · 20.9 KB
/
bootstrap-devel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#!/bin/bash
source ./bootstrap-lib.sh
src_dir="${HOME}/src"
dev_dir="${src_dir}/dev"
collections_dir="${dev_dir}/ansible_collections"
execenvs_dir="${dev_dir}/ansible_execenvs"
# Small script to setup git repos I work in frequently
for dir in "${dev_dir}" "${collections_dir}";
do
fn_mkdir_if_needed "${dir}"
done
fn_git_clone() {
# $1 - Target clone dir
# $2 - git repo
fn_mkdir_if_needed $(dirname $1)
if ! [ -d $1 ]; then
pushd $(dirname $1)
git clone $2 $(basename $1)
popd || exit
fi
}
fn_git_clone_with_upstream() {
# $1 - Target clone dir
# $2 - My git fork url
# $3 - Upstream git url
fn_mkdir_if_needed $(dirname $1)
if ! [ -d $1 ]; then
pushd $(dirname $1)
if git clone $2 $(basename $1); then
pushd $(basename $1)
git remote add upstream $3
popd || exit
popd || exit
fi
fi
}
# local_clone_destination_dir my_fork_or_repo [upstream_repo]
git_repos=(
"${dev_dir}/pytorch [email protected]:maxamillion/pytorch.git https://github.com/pytorch/pytorch.git"
"${dev_dir}/vllm [email protected]:maxamillion/vllm.git https://github.com/opendatahub-io/vllm.git"
"${dev_dir}/ramalama [email protected]:maxamillion/ramalama.git https://github.com/containers/ramalama.git"
"${dev_dir}/archey4 [email protected]:maxamillion/archey4.git https://github.com/HorlogeSkynet/archey4.git"
"${dev_dir}/rebuilding-the-wheel [email protected]:maxamillion/rebuilding-the-wheel.git https://gitlab.com/fedora/sigs/ai-ml/rebuilding-the-wheel.git"
"${dev_dir}/requirements-pipeline [email protected]:maxamillion/requirements-pipeline.git [email protected]:redhat/rhel-ai/wheels/requirements-pipeline.git"
"${dev_dir}/builder [email protected]:maxamillion/builder.git [email protected]:redhat/rhel-ai/wheels/builder.git"
"${dev_dir}/fromager [email protected]:maxamillion/fromager.git https://github.com/python-wheel-build/fromager.git"
"${dev_dir}/triton [email protected]:maxamillion/triton.git https://github.com/triton-lang/triton.git"
"${dev_dir}/modelmesh-serving [email protected]:maxamillion/modelmesh-serving.git https://github.com/opendatahub-io/modelmesh-serving.git"
"${dev_dir}/codeflare [email protected]:maxamillion/codeflare.git https://github.com/project-codeflare/codeflare.git"
"${dev_dir}/llama-stack [email protected]:maxamillion/llama-stack.git https://github.com/meta-llama/llama-stack.git"
"${dev_dir}/odh-dashboard [email protected]:maxamillion/odh-dashboard.git https://github.com/opendatahub-io/odh-dashboard.git"
"${dev_dir}/architecture-decision-records [email protected]:maxamillion/architecture-decision-records.git https://github.com/opendatahub-io/architecture-decision-records.git"
"${dev_dir}/odh-model-controller [email protected]:maxamillion/odh-model-controller.git https://github.com/opendatahub-io/odh-model-controller.git"
"${dev_dir}/rhods-devops-infra [email protected]:maxamillion/rhods-devops-infra.git https://github.com/red-hat-data-services/rhods-devops-infra.git"
"${dev_dir}/opendatahub-documentation [email protected]:maxamillion/opendatahub-documentation.git https://github.com/opendatahub-io/opendatahub-documentation.git"
"${dev_dir}/opendatahub-operator [email protected]:maxamillion/opendatahub-operator.git https://github.com/opendatahub-io/opendatahub-operator.git"
"${dev_dir}/model-registry-operator [email protected]:maxamillion/model-registry-operator.git https://github.com/opendatahub-io/model-registry-operator.git"
"${dev_dir}/training-operator [email protected]:maxamillion/training-operator.git https://github.com/opendatahub-io/training-operator.git"
"${dev_dir}/data-science-pipelines-operator [email protected]:maxamillion/data-science-pipelines-operator.git https://github.com/opendatahub-io/data-science-pipelines-operator.git"
"${dev_dir}/data-science-pipelines [email protected]:maxamillion/data-science-pipelines.git https://github.com/opendatahub-io/data-science-pipelines.git"
"${dev_dir}/codeflare-operator [email protected]:maxamillion/codeflare-operator.git https://github.com/opendatahub-io/codeflare-operator.git"
"${dev_dir}/kubeflow [email protected]:maxamillion/kubeflow.git https://github.com/opendatahub-io/kubeflow.git"
"${dev_dir}/elyra [email protected]:maxamillion/elyra.git https://github.com/opendatahub-io/elyra.git"
"${dev_dir}/elyra-pipeline-editor [email protected]:maxamillion/elyra-pipeline-editor.git https://github.com/opendatahub-io/elyra-pipeline-editor.git"
"${dev_dir}/model-registry [email protected]:maxamillion/model-registry.git https://github.com/opendatahub-io/model-registry.git"
"${dev_dir}/ods-ci [email protected]:maxamillion/ods-ci.git [email protected]:red-hat-data-services/ods-ci.git"
"${dev_dir}/distributed-workloads [email protected]:maxamillion/distributed-workloads.git https://github.com/opendatahub-io/distributed-workloads.git"
"${dev_dir}/notebooks [email protected]:maxamillion/notebooks.git https://github.com/opendatahub-io/notebooks.git"
"${dev_dir}/rhoai-disconnected-install-helper [email protected]:maxamillion/rhoai-disconnected-install-helper.git https://github.com/red-hat-data-services/rhoai-disconnected-install-helper.git"
"${dev_dir}/kserve [email protected]:maxamillion/kserve.git https://github.com/opendatahub-io/kserve.git"
"${dev_dir}/ei-edge [email protected]:maxamillion/ai-edge.git https://github.com/opendatahub-io/ai-edge.git"
"${dev_dir}/kuberay [email protected]:maxamillion/kuberay.git https://github.com/opendatahub-io/kuberay.git"
"${dev_dir}/glances [email protected]:maxamillion/glances.git https://github.com/nicolargo/glances.git"
"${dev_dir}/ansible [email protected]:maxamillion/ansible.git https://github.com/ansible/ansible.git"
"${dev_dir}/ara [email protected]:maxamillion/ara.git https://github.com/ansible-community/ara.git"
"${dev_dir}/ansible-examples [email protected]:maxamillion/ansible-examples.git https://github.com/ansible/ansible-examples.git"
"${dev_dir}/handbook [email protected]:maxamillion/handbook.git [email protected]:ansible/handbook.git"
"${dev_dir}/ansible-runner [email protected]:maxamillion/ansible-runner.git https://github.com/ansible/ansible-runner.git"
"${dev_dir}/ansible-rulebook [email protected]:maxamillion/ansible-rulebook.git https://github.com/ansible/ansible-rulebook.git"
"${dev_dir}/ansible-sdk [email protected]:maxamillion/ansible-sdk.git https://github.com/ansible/ansible-sdk.git"
"${dev_dir}/ansible-dev-tools [email protected]:maxamillion/ansible-cdk.git https://github.com/ansible-community/ansible-dev-tools.git"
"${dev_dir}/ansible-lint [email protected]:maxamillion/ansible-lint.git https://github.com/ansible/ansible-lint.git"
"${dev_dir}/ansible-builder [email protected]:maxamillion/ansible-builder.git https://github.com/ansible/ansible-builder.git"
"${dev_dir}/ansible-creator [email protected]:maxamillion/ansible-creator.git https://github.com/ansible/ansible-creator.git"
"${dev_dir}/ansible-community [email protected]:maxamillion/community.git https://github.com/ansible/community.git"
"${dev_dir}/community-website [email protected]:maxamillion/community-website.git https://github.com/ansible-community/community-website.git"
"${dev_dir}/dnf [email protected]:maxamillion/dnf.git https://github.com/rpm-software-management/dnf.git"
"${dev_dir}/mock [email protected]:maxamillion/mock.git https://github.com/rpm-software-management/mock.git"
"${dev_dir}/toolbox [email protected]:maxamillion/toolbox.git https://github.com/containers/toolbox.git"
"${dev_dir}/releng ssh://[email protected]/forks/maxamillion/releng.git https://pagure.io/releng.git"
"${dev_dir}/releng-automation ssh://[email protected]/forks/maxamillion/releng-automation.git https://pagure.io/releng-automation.git"
"${dev_dir}/fedora-kickstarts ssh://[email protected]/forks/maxamillion/fedora-kickstarts.git https://pagure.io/fedora-kickstarts.git"
"${dev_dir}/baremetal-deploy [email protected]:maxamillion/baremetal-deploy.git https://github.com/openshift-kni/baremetal-deploy.git"
"${dev_dir}/kubespray [email protected]:maxamillion/kubespray.git https://github.com/kubernetes-sigs/kubespray.git"
"${dev_dir}/kind [email protected]:maxamillion/kind.git https://github.com/kubernetes-sigs/kind"
"${dev_dir}/greenboot [email protected]:maxamillion/greenboot.git https://github.com/fedora-iot/greenboot.git"
"${dev_dir}/minikube [email protected]:maxamillion/minikube.git https://github.com/kubernetes/minikube.git"
"${dev_dir}/operator-sdk [email protected]:maxamillion/operator-sdk.git https://github.com/operator-framework/operator-sdk"
"${dev_dir}/podman [email protected]:maxamillion/podman.git https://github.com/containers/podman"
"${dev_dir}/podman-system-role [email protected]:maxamillion/podman-system-role.git https://github.com/linux-system-roles/podman.git"
"${dev_dir}/distrobox [email protected]:maxamillion/distrobox.git https://github.com/89luca89/distrobox.git"
"${dev_dir}/layering-examples [email protected]:maxamillion/layering-examples.git https://github.com/coreos/layering-examples.git"
"${dev_dir}/instructlab [email protected]:maxamillion/instructlab.git https://github.com/instructlab/instructlab.git"
"${dev_dir}/taxonomy [email protected]:maxamillion/taxonomy.git https://github.com/instructlab/taxonomy.git"
"${dev_dir}/ai-lab-recipes [email protected]:maxamillion/ai-lab-recipes.git https://github.com/containers/ai-lab-recipes.git"
"${dev_dir}/dool [email protected]:maxamillion/dool.git https://github.com/scottchiefbaker/dool.git"
"${dev_dir}/tuned [email protected]:maxamillion/tuned.git https://github.com/redhat-performance/tuned.git"
"${src_dir}/maxible [email protected]:maxamillion/maxible.git"
"${src_dir}/maxamillion.github.io [email protected]:maxamillion/maxamillion.github.io.git"
"${src_dir}/yum https://github.com/rpm-software-management/yum.git"
"${src_dir}/yum-utils https://github.com/rpm-software-management/yum-utils.git"
"${src_dir}/firewalld https://github.com/firewalld/firewalld.git"
"${src_dir}/portfolio-architecture-examples https://gitlab.com/redhatdemocentral/portfolio-architecture-examples.git"
"${src_dir}/fedora-infra-ansible https://infrastructure.fedoraproject.org/infra/ansible.git"
"${src_dir}/requirements-pipeline [email protected]:redhat/rhel-ai/wheels/requirements-pipeline.git"
# "${dev_dir}/ansible-zuul-jobs [email protected]:maxamillion/ansible-zuul-jobs.git https://github.com/ansible/ansible-zuul-jobs.git"
# "${dev_dir}/ansible-operator-plugins [email protected]:maxamillion/ansible-operator-plugins.git https://github.com/operator-framework/ansible-operator-plugins.git"
# "${dev_dir}/ansible.pages.redhat.com [email protected]:admiller/ansible.pages.redhat.com.git https://gitlab.cee.redhat.com/ansible/ansible.pages.redhat.com.git"
# "${dev_dir}/ansible-hub-ui [email protected]:maxamillion/ansible-hub-ui.git https://github.com/ansible/ansible-hub-ui.git"
# "${dev_dir}/ansible-bender [email protected]:maxamillion/ansible-bender.git https://github.com/ansible-community/ansible-bender.git"
# "${dev_dir}/ansible-risk-insight [email protected]:maxamillion/ansible-risk-insight.git https://github.com/ansible/ansible-risk-insight.git"
# "${dev_dir}/ansible-scan-core [email protected]:maxamillion/ansible-scan-core.git [email protected]:ansible/ansible-scan-core.git"
# "${dev_dir}/ansible-gatekeeper [email protected]:maxamillion/ansible-gatekeeper.git [email protected]:ansible/ansible-gatekeeper.git"
# "${dev_dir}/ansible-demo-policies [email protected]:maxamillion/ansible-demo-policies.git [email protected]:ansible/ansible-demo-policies.git"
# "${dev_dir}/ansible-language-server [email protected]:maxamillion/ansible-language-server.git https://github.com/ansible/ansible-language-server.git"
# "${dev_dir}/openshift-ansible [email protected]:maxamillion/openshift-ansible.git https://github.com/openshift/openshift-ansible.git"
# "${dev_dir}/ecosystem-documentation [email protected]:maxamillion/ecosystem-documentation.git https://github.com/ansible/ecosystem-documentation.git"
# "${dev_dir}/awx [email protected]:maxamillion/awx.git https://github.com/ansible/awx.git"
# "${dev_dir}/awx-resource-operator [email protected]:maxamillion/awx-resource-operator.git https://github.com/ansible/awx-resource-operator.git"
# "${dev_dir}/aap-upstream-ci [email protected]:maxamillion/aap-upstream-ci.git [email protected]:ansible/aap-upstream-ci.git"
# "${dev_dir}/galaxy_ng [email protected]:maxamillion/galaxy_ng.git https://github.com/ansible/galaxy_ng.git"
# "${dev_dir}/automation-platform-collection [email protected]:maxamillion/automation-platform-collection.git [email protected]:ansible/automation-platform-collection.git"
# "${dev_dir}/automation-platform-setup [email protected]:maxamillion/automation-platform-setup.git [email protected]:ansible/automation-platform-setup.git"
# "${dev_dir}/el_grandiose_module_promoter [email protected]:maxamillion/el_grandiose_module_promoter.git https://github.com/ansible-collections/el_grandiose_module_promoter.git"
# "${dev_dir}/receptor [email protected]:maxamillion/receptor.git https://github.com/ansible/receptor.git"
# "${dev_dir}/molecule [email protected]:maxamillion/molecule.git https://github.com/ansible/molecule.git"
# "${dev_dir}/workshops [email protected]:maxamillion/workshops.git https://github.com/ansible/workshops.git"
# "${dev_dir}/device-edge-workshops [email protected]:maxamillion/device-edge-workshops.git https://github.com/redhat-manufacturing/device-edge-workshops.git"
# "${dev_dir}/workshop-examples [email protected]:maxamillion/workshop-examples.git https://github.com/ansible-security/workshop-examples.git"
# "${dev_dir}/zuul-jobs [email protected]:maxamillion/ansible-zuul-jobs.git https://github.com/ansible/ansible-zuul-jobs.git"
# "${dev_dir}/zuul-config [email protected]:maxamillion/zuul-config.git https://github.com/ansible/ansible-config.git"
# "${dev_dir}/zuul-project-config [email protected]:maxamillion/project-config.git https://github.com/ansible/project-config.git"
# "${dev_dir}/zuul-windmill-config [email protected]:maxamillion/windmill-config.git https://github.com/maxamillion/windmill-config.git"
# "${dev_dir}/osbuild-composer [email protected]:maxamillion/osbuild-composer.git https://github.com/osbuild/osbuild-composer.git"
# "${dev_dir}/osbuild [email protected]:maxamillion/osbuild.git https://github.com/osbuild/osbuild.git"
# "${dev_dir}/cloud-connector [email protected]:maxamillion/cloud-connector.git https://github.com/RedHatInsights/cloud-connector.git"
# "${dev_dir}/yggdrasil [email protected]:maxamillion/yggdrasil.git https://github.com/RedHatInsights/yggdrasil.git"
# "${dev_dir}/playbook-dispatcher [email protected]:maxamillion/playbook-dispatcher.git https://github.com/RedHatInsights/playbook-dispatcher.git"
# "${dev_dir}/rhc-worker-playbook [email protected]:maxamillion/rhc-worker-playbook.git https://github.com/RedHatInsights/rhc-worker-playbook.git"
# "${dev_dir}/insights-core [email protected]:maxamillion/insights-core.git https://github.com/RedHatInsights/insights-core.git"
# "${dev_dir}/awx-operator [email protected]:maxamillion/awx-operator.git https://github.com/ansible/awx-operator.git"
# "${dev_dir}/ids_install [email protected]:maxamillion/ids_install.git https://github.com/ansible-security/ids_install.git"
# "${dev_dir}/ids_config [email protected]:maxamillion/ids_config.git https://github.com/ansible-security/ids_config.git"
# "${dev_dir}/ids_rule [email protected]:maxamillion/ids_rule.git https://github.com/ansible-security/ids_rule.git"
# "${src_dir}/k4e-operator https://github.com/jakub-dzon/k4e-operator.git"
# "${src_dir}/k4e-device-worker https://github.com/jakub-dzon/k4e-device-worker.git"
# "${src_dir}/meta-rpm https://gitlab.com/fedora-iot/meta-rpm.git"
# "${collections_dir}/maxamillion/devel [email protected]:maxamillion/ansible_collections.maxamillion.devel.git"
# "${collections_dir}/consoledot/edgemanagement [email protected]:maxamillion/consoledot.edgemanagement.git https://github.com/ansible-collections/consoledot.edgemanagement.git"
# "${collections_dir}/ansible/eda [email protected]:maxamillion/ansible.eda.git https://github.com/ansible/event-driven-ansible"
# "${collections_dir}/ansible/posix [email protected]:maxamillion/ansible.posix.git https://github.com/ansible-collections/ansible.posix.git"
# "${collections_dir}/ansible/utils [email protected]:maxamillion/ansible.utils.git https://github.com/ansible-collections/ansible.utils.git"
# "${collections_dir}/ansible/netcommon [email protected]:maxamillion/ansible.netcommon.git https://github.com/ansible-collections/ansible.netcommon.git"
# "${collections_dir}/ansible/content_builder [email protected]:maxamillion/ansible.content_builder.git https://github.com/ansible-community/ansible.content_builder.git"
# "${collections_dir}/ansible/containerized_installer [email protected]:admiller/aap-containerized-installer.git [email protected]:ansible/aap-containerized-installer.git"
# "${collections_dir}/community/general [email protected]:maxamillion/community.general.git https://github.com/ansible-collections/community.general.git"
# "${collections_dir}/community/kubernetes [email protected]:maxamillion/community.kubernetes.git https://github.com/ansible-collections/community.kubernetes.git"
# "${collections_dir}/community/okd [email protected]:maxamillion/community.okd.git https://github.com/ansible-collections/community.okd.git"
# "${collections_dir}/community/cip [email protected]:maxamillion/community.cip.git https://github.com/ansible-collections/community.cip.git"
# "${collections_dir}/community/vmware [email protected]:maxamillion/community.vmware.git https://github.com/ansible-collections/community.vmware.git"
# "${collections_dir}/cloud/common [email protected]:maxamillion/cloud.common.git https://github.com/ansible-collections/cloud.common.git"
# "${collections_dir}/containers/podman [email protected]:maxamillion/ansible-podman-collections.git https://github.com/containers/ansible-podman-collections.git"
# "${collections_dir}/infra/osbuild [email protected]:maxamillion/infra.osbuild.git https://github.com/redhat-cop/infra.osbuild.git"
# "${collections_dir}/fedora/iot [email protected]:maxamillion/fedora.iot.git"
# "${collections_dir}/osbuild/composer [email protected]:maxamillion/osbuild.composer.git https://github.com/ansible-collections/osbuild.composer.git"
# "${collections_dir}/edge/workload [email protected]:maxamillion/edge.workload.git https://github.com/ansible-collections/edge.workload.git"
# "${collections_dir}/edge/microshift [email protected]:maxamillion/edge.microshift.git https://github.com/ansible-collections/edge.microshift.git"
# "${collections_dir}/edge/test_utils [email protected]:maxamillion/edge.test_utils.git https://github.com/ansible-collections/edge.test_utils.git"
# "${collections_dir}/redhat_cop/controller_configuration [email protected]:maxamillion/controller_configuration.git https://github.com/redhat-cop/controller_configuration.git"
# "${collections_dir}/redhat_cop/ah_configuration [email protected]:maxamillion/ah_configuration.git https://github.com/redhat-cop/ah_configuration.git"
# "${collections_dir}/redhat_cop/ee_utilities [email protected]:maxamillion/ee_utilities.git https://github.com/redhat-cop/ee_utilities.git"
# "${collections_dir}/redhat_cop/aap_utilities [email protected]:maxamillion/aap_utilities.git https://github.com/redhat-cop/aap_utilities.git"
# "${collections_dir}/kubevirt/core [email protected]:maxamillion/kubevirt.core.git https://github.com/kubevirt/kubevirt.core"
# "${collections_dir}/kubernetes/core [email protected]:maxamillion/kubernetes.core.git https://github.com/ansible-collections/kubernetes.core"
# "${collections_dir}/vmware/vmware_rest [email protected]:maxamillion/vmware.vmware_rest.git https://github.com/ansible-collections/vmware.vmware_rest.git"
# "${collections_dir}/community/qradar [email protected]:maxamillion/community.qradar.git https://github.com/ansible-collections/community.qradar.git"
# "${collections_dir}/community/es [email protected]:maxamillion/community.es.git https://github.com/ansible-collections/community.es.git"
# "${collections_dir}/ibm/qradar [email protected]:maxamillion/ibm_qradar.git https://github.com/ansible-collections/ibm.qradar.git"
# "${collections_dir}/ibm/isam [email protected]:maxamillion/isam-ansible-roles.git https://github.com/IBM-Security/isam-ansible-roles.git"
# "${execenvs_dir}/fedora.iot [email protected]:maxamillion/execenv.fedora.iot.git"
)
for repo_string in "${git_repos[@]}"
do
readarray -d ' ' repo_string_split <<< "${repo_string}"
if [ "${#repo_string_split[@]}" -eq 2 ]; then
fn_git_clone "${repo_string_split[0]}" "${repo_string_split[1]}"
elif [ "${#repo_string_split[@]}" -eq 3 ]; then
fn_git_clone_with_upstream "${repo_string_split[0]}" "${repo_string_split[1]}" "${repo_string_split[2]}"
fi
if [[ "${repo_string_split[0]}" =~ "${collections_dir}" ]]; then
collection_shortdir="${repo_string_split[0]#${collections_dir}/*}"
fn_mkdir_if_needed ${HOME}/.ansible/collections/ansible_collections/${collection_shortdir%*/*}
fn_symlink_if_needed ${repo_string_split[0]} ${HOME}/.ansible/collections/ansible_collections/${collection_shortdir}
fi
done