Skip to content

Commit

Permalink
Merge pull request #344 from garden-io/update-install-docs
Browse files Browse the repository at this point in the history
Update install docs
  • Loading branch information
edvald authored Oct 28, 2018
2 parents 53dd826 + dd92cc6 commit 42e52c9
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 219 deletions.
39 changes: 16 additions & 23 deletions docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ If you haven't already set up homebrew, please follow [their instructions](https

#### Step 2: Docker and local Kubernetes

To install Docker, Kubernetes and kubectl, we strongly recommend Docker for Mac (edge version).
To install Docker, Kubernetes and kubectl, we strongly recommend Docker for Mac.

_Note: you need to install the **edge version** of Docker for Mac in
_Note: If you have an older version installed, you may need to update it in
order to enable Kubernetes support._

Once installed, open the Docker for Mac preferences, go to the Kubernetes section,
Expand All @@ -43,43 +43,36 @@ brew tap garden-io/garden
brew install garden-cli
```

To later upgrade to the newest version, simply run `brew update` and then `brew upgrade garden-cli`
(or `brew upgrade` to upgrade all your Homebrew packages).
To later upgrade to the newest version, simply run `brew update` and then `brew upgrade garden-cli`.

### Windows

You can run Garden on Windows 10 Pro or Enterprise editions (The Home edition unfortunately does not work because it
does not include support for virtualization). To install the Garden CLI please use our _automated installation script_,
which will check for dependencies, install missing dependencies if needed, and finally install the `garden-cli`
npm package.
does not include support for virtualization).

The things the script will check for are the following:

* The [Chocolatey](https://chocolatey.org) package manager.
* Whether you have Hyper-V enabled. This is required for _Docker for Windows_. If you do not already have it enabled,
the script will enable it but you will need to restart your computer before starting Docker for Windows.
* Docker - We strongly recommend using the _Edge version_ of
[Docker for Windows](https://docs.docker.com/docker-for-windows/edge-release-notes/), which has built-in support for Kubernetes. It is also
_possible_ to configure Docker and Kubernetes differently, using minikube for example, but in most cases
Docker for Windows is much easier to install and configure, and is well supported. The script will check if Docker is
installed, and whether Kubernetes has been enabled as the default orchestrator.
* Node.js - The script will install it via Chocolatey if it is missing, but note that _if you already have Node.js
installed, please make sure it is version 8.x or newer._
* Git and rsync. The script will install those if they are missing.
To install the Garden CLI please use our automated installation script,
which will check for dependencies, install missing dependencies if needed, and finally install the Garden CLI.

To run the script, open PowerShell as an Administrator and run:

```PowerShell
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/garden-io/garden/master/garden-service/support/install.ps1'))
```

To later upgrade to the newest version, run `npm install -g -U garden-cli`.
The things the script will check for are the following:

* The [Chocolatey](https://chocolatey.org) package manager. The script installs it automatically if necessary.
* _git_, _rsync_ and _Docker for Windows_. The script will install or upgrade those via Chocolatey.
* Whether you have Hyper-V enabled. This is required for _Docker for Windows_. If you do not already have it enabled,
the script will enable it but you will need to restart your computer before starting Docker for Windows.
* Whether you have Kubernetes enabled in your _Docker for Windows_ installation.

To later upgrade to the newest version, simply re-run the above script.

### Linux (manual installation)

You need the following dependencies on your local machine to use Garden:

* Node.js >= 8.x
* [Docker](https://docs.docker.com/)
* Git
* rsync
Expand All @@ -96,7 +89,7 @@ For local Kubernetes, you can use [Minikube](https://github.com/kubernetes/minik

#### Step 3: Install other dependencies

Use your preferred method or package manager to install `node` (version 8.x or higher), `git` and `rsync`.
Use your preferred method or package manager to install `git` and `rsync`.

#### Step 4: Install `garden-cli`

Expand Down
4 changes: 2 additions & 2 deletions garden-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "garden-cli",
"version": "0.7.0",
"version": "0.8.0",
"description": "A full-featured development framework for containers and serverless",
"repository": {
"type": "git",
Expand Down Expand Up @@ -161,4 +161,4 @@
},
"snyk": true,
"gitHead": "b0647221a4d2ff06952bae58000b104215aed922"
}
}
37 changes: 18 additions & 19 deletions garden-service/scripts/build-pkg.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash -e

garden_cli_root=$(cd `dirname $0` && cd .. && pwd)
garden_service_root=$(cd `dirname $0` && cd .. && pwd)

cd ${garden_cli_root}
cd ${garden_service_root}

commit_hash=$(git rev-parse --short HEAD)
version=$(cat package.json | jq -r .version)
Expand All @@ -11,12 +11,11 @@ echo "Packaging version ${version}-${commit_hash}"

echo "-> Copying files to tmp build dir..."
mkdir -p dist
rm -rf tmp/dist
mkdir -p tmp/dist

cp -r package.json build static node_modules tmp/dist

echo "-> Cleaning up .garden directories..."
find tmp/dist -depth -type d -name ".garden" -exec rm -r "{}" \;
cp -r package.json build node_modules tmp/dist
rsync -r --exclude=.garden --exclude=.git static tmp/dist

echo "-> Building executables..."
cd dist
Expand All @@ -25,18 +24,18 @@ pkg --target node10-linux-x64,node10-win-x64 ../tmp/dist

echo "-> Preparing packages..."

echo " -> linux-x64"
rm -rf linux-x64
mkdir linux-x64
mv garden-cli-linux linux-x64/garden
cp -r ../tmp/dist/static linux-x64
tar -czf garden-${version}-${commit_hash}.tar.gz linux-x64

echo " -> win-x64"
rm -rf win-x64
mkdir win-x64
mv garden-cli-win.exe win-x64/garden.exe
cp -r ../tmp/dist/static win-x64
zip -q -r garden-${version}-${commit_hash}.zip win-x64
echo " -> linux-amd64"
rm -rf linux-amd64
mkdir linux-amd64
mv garden-cli-linux linux-amd64/garden
cp -r ../tmp/dist/static linux-amd64
tar -czf garden-${version}-${commit_hash}-linux-amd64.tar.gz linux-amd64

echo " -> win-amd64"
rm -rf win-amd64
mkdir win-amd64
mv garden-cli-win.exe win-amd64/garden.exe
cp -r ../tmp/dist/static win-amd64
zip -q -r garden-${version}-${commit_hash}-win-amd64.zip win-amd64

echo "Done!"
174 changes: 0 additions & 174 deletions garden-service/support/install.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"packages": [
"garden-service/"
],
"version": "0.7.0"
"version": "0.8.0"
}
File renamed without changes.
Loading

0 comments on commit 42e52c9

Please sign in to comment.