Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit e7a67ac

Browse files
committed
replace sh checking with native --wait argument, add helm plugin to run sh script for native experience with helm
1 parent b426da3 commit e7a67ac

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,18 @@ The software listed below should be available in [PATH](https://en.wikipedia.org
112112
# NFS configuration is needed just once for each project, it will prompt for your password to make changes on the host
113113
bash scripts/host/configure_nfs_exports.sh
114114
115-
bash init_project.sh
115+
helm plugin install .
116+
117+
helm init-magento
116118
```
117119
To initialize project with checkout container,
118120
clone sources to checkout directory and use -e parameter to init_project.sh call.
119121
```
120-
bash init_project.sh -e
122+
helm init-magento -e
121123
```
122124
If yiu have issues with nfs. To use filesystem mount instead of nfs use -d parameter to init_project.sh call.
123125
```
124-
bash init_project.sh -d
126+
helm init-magento -d
125127
```
126128
127129
1. Use the `magento2-devbox` directory as the project root in PHP Storm (not `magento2-devbox/magento`). This is important, because in this case PHP Storm will be configured automatically by [init_project.sh](init_project.sh).<!-- If NFS files sync is disabled in [config](etc/config.yaml.dist) and ![](docs/images/windows-icon.png)on Windows hosts [verify the deployment configuration in PHP Storm](docs/phpstorm-configuration-windows-hosts.md).-->

init_project.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ if [[ $(isMinikubeRunning) -eq 0 ]]; then
245245
fi
246246
status "Configuring kubernetes cluster on the minikube"
247247
# TODO: Optimize. Helm tiller must be initialized and started before environment configuration can begin
248-
helm init
249-
waitForKubernetesPodToRun 'tiller-deploy'
248+
helm init --wait
249+
#waitForKubernetesPodToRun 'tiller-deploy'
250250

251251
# TODO: change k-rebuild-environment to comply with formatting requirements
252252
if [[ "${disable_nfs}" == 1 ]]; then

plugin.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: "init-magento"
2+
version: "0.1.0"
3+
usage: "Init magento project"
4+
description: |-
5+
This plugin runs minikube, clone magento repo and initialize helm project.
6+
ignoreFlags: false
7+
useTunnel: false
8+
command: "$HELM_PLUGIN_DIR/init_project.sh"

scripts/host/k_rebuild_environment.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ done
3232
cd "${vagrant_dir}/etc/helm" && helm install \
3333
--name magento2 \
3434
--values values.yaml \
35+
--wait \
3536
--set global.monolith.volumeHostPath="${vagrant_dir}" \
3637
--set global.persistence.nfs.enabled="${enable_nfs}" \
3738
--set global.checkout.enabled="${enable_checkout}" \
3839
--set global.checkout.volumeHostPath="${vagrant_dir}" .
3940

4041
# TODO: Waiting for containers to initialize before proceeding
41-
waitForKubernetesPodToRun 'magento2-monolith'
42-
waitForKubernetesPodToRun 'magento2-mysql'
43-
waitForKubernetesPodToRun 'magento2-redis-master'
42+
#waitForKubernetesPodToRun 'magento2-monolith'
43+
#waitForKubernetesPodToRun 'magento2-mysql'
44+
#waitForKubernetesPodToRun 'magento2-redis-master'
4445

4546
exit 0

0 commit comments

Comments
 (0)