Skip to content

Commit 5ede6b5

Browse files
authored
Merge pull request #6 from magento/nfs-storage-class
Add plugin and remove wait hacks
2 parents 6301859 + e7a67ac commit 5ede6b5

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,18 @@ The software listed below should be available in [PATH](https://en.wikipedia.org
109109
# NFS configuration is needed just once for each project, it will prompt for your password to make changes on the host
110110
bash scripts/host/configure_nfs_exports.sh
111111
112-
bash init_project.sh
112+
helm plugin install .
113+
114+
helm init-magento
113115
```
114116
To initialize project with checkout container,
115117
clone sources to checkout directory and use -e parameter to init_project.sh call.
116118
```
117-
bash init_project.sh -e
119+
helm init-magento -e
118120
```
119121
If yiu have issues with nfs. To use filesystem mount instead of nfs use -d parameter to init_project.sh call.
120122
```
121-
bash init_project.sh -d
123+
helm init-magento -d
122124
```
123125
124126
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).-->

etc/helm/requirements.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ dependencies:
1010
repository: "@stable"
1111
version: "3.6.3"
1212
- name: checkout
13-
repository: http://localhost:10191
13+
repository: file://./charts/
1414
version: 0.1.0
1515
condition: global.checkout.enabled

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)