Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Jul 1, 2020
2 parents 257e05a + 93e3b71 commit 71de190
Show file tree
Hide file tree
Showing 189 changed files with 11,641 additions and 88 deletions.
54 changes: 29 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="static/img/devspace-logo.svg">

### **[Website](https://devspace.sh)** • **[Quickstart](#quickstart)** • **[Examples](#configuration-examples)** • **[Documentation](https://devspace.sh/cli/docs/introduction)** • **[Blog](https://devspace.cloud/blog)** • **[Slack](https://slack.devspace.cloud/)** • **[Twitter](https://twitter.com/devspace)**
### **[Website](https://devspace.sh)** • **[Quickstart](#quickstart)** • **[Examples](#configuration-examples)** • **[Documentation](https://devspace.sh/cli/docs/introduction)** • **[Blog](https://devspace.cloud/blog)** • **[Twitter](https://twitter.com/devspace)**

![Build Status Passing](https://img.shields.io/github/workflow/status/devspace-cloud/devspace/Test%20&%20Release%20CLI%20Version/master?style=for-the-badge)
![Latest Release](https://img.shields.io/github/v/release/devspace-cloud/devspace?style=for-the-badge&label=Latest%20Release&color=%23007ec6)
Expand All @@ -9,6 +9,8 @@
![Total Downloads (GitHub Releases)](https://img.shields.io/github/downloads/devspace-cloud/devspace/total?style=for-the-badge&label=Total%20Downloads&color=%23007ec6)
![NPM Installs per Month](https://img.shields.io/npm/dm/devspace?label=NPM%20Installs&style=for-the-badge&color=%23007ec6)

[![Join us on Slack!](static/img/slack.svg)](https://slack.k8s.io/#devspace)

### Client-Only Developer Tool for Cloud-Native Development with Kubernetes
- **Build, test and debug applications directly inside Kubernetes**
- **Develop with hot reloading**: updates your running containers without rebuilding images or restarting containers
Expand Down Expand Up @@ -51,7 +53,7 @@ Building modern, distributed and highly scalable microservices with Kubernetes i

DevSpace allows you to store all your workflows in one declarative config file: `devspace.yaml`
- **Codify workflow knowledge** about building images, deploying your project and its dependencies etc.
- **Version your workflows together with your code** (i.e. you can get any old version up and running with just a single command)
- **Version your workflows together with your code** (i.e. you can get any old version up and running with just a single command)
- **Share your workflows** with your team mates

<br>
Expand All @@ -66,7 +68,7 @@ DevSpace helps your team to standardize deployment and development workflows wit
- If other developers on your team check out the project, they only need to run `devspace deploy` to deploy the project (including image building and deployment of other related project etc.) and they have a running instance of the project
- The configuration of DevSpace is highly dynamic, so you can configure everything using [config variables](https://devspace.sh/cli/docs/configuration/variables/basics) that make it much easier to have one base configuration but still allow differences among developers (e.g. different sub-domains for testing)

> Giving everyone on your team on-demand access to a Kubernetes cluster is a challenging problem for system administrators and infrastructure managers. DevSpace Cloud, an optional add-on for DevSpace, makes sharing dev clusters much easier and safer. [Learn more about DevSpace Cloud](https://devspace.cloud/cloud/docs/introduction).
> Giving everyone on your team on-demand access to a Kubernetes cluster is a challenging problem for system administrators and infrastructure managers. DevSpace Cloud, an optional add-on for DevSpace, makes sharing dev clusters much easier and safer. [Learn more about DevSpace Cloud](https://devspace.cloud/cloud/docs/introduction).

<br>
</details>
Expand Down Expand Up @@ -128,9 +130,9 @@ Stop wasting time for running the same build and deploy commands over and over a
<br>

- **Customizable Build Process** supporting Docker, kaniko or even custom scripts
- **Parallel Image Building** to save time when multiple Dockerfiles have to be built
- **Automatic Image Tagging** according to custom tag schema (e.g. using timestamp, commit hash or random strings)
- **Automatic Push** to any public or private Docker registry (authorization via `docker login my-registry.tld`)
- **Parallel Image Building** to save time when multiple Dockerfiles have to be built
- **Automatic Image Tagging** according to custom tag schema (e.g. using timestamp, commit hash or random strings)
- **Automatic Push** to any public or private Docker registry (authorization via `docker login my-registry.tld`)
- **Automatic Configuration of Pull Secrets** within the Kubernetes cluster
- **Smart Caching** that skips images which do not need to be rebuilt

Expand Down Expand Up @@ -186,11 +188,11 @@ Stop wasting time for running the same build and deploy commands over and over a
<summary><b>Convenience Commands for Kubernetes</b></summary>
<br>

- **Quick Pod Selection** eliminates the need to copy & paste pod names, namespaces etc.
- **Quick Pod Selection** eliminates the need to copy & paste pod names, namespaces etc.
&raquo; Shows a "dropdown selector" for pods directly in the CLI when running one of these commands:
- `devspace enter` to open a **Interactive Terminal Session**
- `devspace logs` / `devspace logs -f` for **Fast, Real-Time Logs** (optionally streaming new logs)
- `devspace sync` for quickly starting a **Bi-Directional, Real-Time File Synchronization** on demand
- `devspace sync` for quickly starting a **Bi-Directional, Real-Time File Synchronization** on demand
- **Automatic Issue Analysis** via `devspace analyze` reporting crashed containers, missing endpoints, scheduling errors, ...
- **Fast Deletion of Deployments** using `devspace purge` (deletes all helm charts, manifests etc. defined in the config)
- **Context Management** via:
Expand Down Expand Up @@ -238,7 +240,7 @@ Stop wasting time for running the same build and deploy commands over and over a
- **Advanced Permission System** that automatically enforces user limits via resource quotas, adminission controllers etc.
- **Fully Automatic Context Configuration** on the machines of all cluster users with secure access token handling
- **100% Pure Kubernetes** and nothing else! Works with any Kubernetes cluster.

**More info and install intructions for DevSpace Cloud on: [www.github.com/devspace-cloud/devspace-cloud](https://github.com/devspace-cloud/devspace-cloud)**

</details>
Expand Down Expand Up @@ -465,24 +467,24 @@ DevSpace Cloud makes sure that developers cannot break out of their namespaces b

<details>
<summary><b>Can I run DevSpace Cloud on-premise in my own cluster?</b></summary>

**Yes**. Follow these intructions to run DevSpace Cloud yourself:

**1. Install DevSpace Cloud**
**1. Install DevSpace Cloud**
&nbsp;&nbsp;&nbsp;
See [www.github.com/devspace-cloud/devspace-cloud](https://github.com/devspace-cloud/devspace-cloud) for instructions.

**2. Tell DevSpace to use your self-hosted DevSpace Cloud**
**2. Tell DevSpace to use your self-hosted DevSpace Cloud**
```bash
devspace use provider devspace.my-domain.com
```

**3. Connect a Kubernetes cluster to your self-hosted DevSpace Cloud**
**3. Connect a Kubernetes cluster to your self-hosted DevSpace Cloud**
```bash
devspace connect cluster
```

**4. Create an isolated namespace**
**4. Create an isolated namespace**
```bash
devspace create space my-app
```
Expand All @@ -502,7 +504,7 @@ devspace dev
```
You can now:
- Access your application via `http://localhost:PORT` in your browser
- Edit your source code files and DevSpace will automatically synchronize them to the containers running in Kubernetes
- Edit your source code files and DevSpace will automatically synchronize them to the containers running in Kubernetes
- Use a hot reloading tool like `nodemon` and your application will automatically reload when you edit source code files

> Run `devspace dev -i` to use interactive mode: overrides your Dockerfile `ENTRYPOINT` with `[sleep, 999999]` and opens the terminal proxy, so you can manually run the start command for your application, e.g. `npm start`. Interactive mode is great for debugging containers that keep crashing or starting an application in hot reloading mode when the Dockerfile ENTRYPOINT generally starts a rather production-like version of the application.
Expand Down Expand Up @@ -597,7 +599,7 @@ version: {config-version}
images: # DevSpace will build these images in parallel and push them to the respective registries
{image-a}: ... # tells DevSpace how to build image-a
{image-b}: ... # tells DevSpace how to build image-b
...
...

deployments: # DevSpace will deploy these [Helm charts | manifests | ... ] one after another
- {deployment-1} # could be a Helm chart
Expand Down Expand Up @@ -711,7 +713,7 @@ dependencies:

<br>

The following sections show code snippets with example sections of a `devspace.yaml` for certain use cases.
The following sections show code snippets with example sections of a `devspace.yaml` for certain use cases.


### Configure Image Building
Expand Down Expand Up @@ -819,7 +821,7 @@ deployments:
```
Learn more about:
- [What are components?](https://devspace.sh/component-chart/docs/introduction)
- [Configuring Components](https://devspace.sh/component-chart/docs/configuration/reference)
- [Configuring Components](https://devspace.sh/component-chart/docs/configuration/reference)

<img src="static/img/line.svg" height="1">

Expand Down Expand Up @@ -885,7 +887,7 @@ deployments:
- more-manifests/
kustomize: true
```
Take a look at the documentation for more information about [deploying manifests with kustomize](https://devspace.sh/cli/docs/configuration/deployments/kustomizations).
Take a look at the documentation for more information about [deploying manifests with kustomize](https://devspace.sh/cli/docs/configuration/deployments/kustomizations).

<img src="static/img/line.svg" height="1">

Expand Down Expand Up @@ -929,7 +931,7 @@ dependencies:
- source:
git: https://github.com/my-api-server
- source:
git: https:/my-private-git.tld/my-auth-server
git: https:/my-private-git.tld/my-auth-server
- source:
path: ../my-auth-server
profile: production
Expand Down Expand Up @@ -1112,7 +1114,7 @@ devspace analyze
```

##### 2. Check your Dockerfile
Make sure your Dockerfile works correctly. Use Google to find the best solutions for creating a Dockerfile for your application (often depends on the framework you are using).
Make sure your Dockerfile works correctly. Use Google to find the best solutions for creating a Dockerfile for your application (often depends on the framework you are using).

If your pods are crashing, you might have the wrong `ENTRYPOINT` or something is missing within your containers. A great way to debug this is to start the interactive development mode using:
```bash
Expand Down Expand Up @@ -1145,7 +1147,7 @@ DevSpace tries to open a browser window, so you can login to DevSpace Cloud (eit
#### Solution A
Run DevSpace on your local machine where you have a browser installed.

#### Solution B
#### Solution B
Generate an access key and login with the non-interactive login method. Follow these steps:
1. Open this page: https://app.devspace.cloud/settings/access-keys (for on-premise version: https://[my-devspace-cloud-url]/settings/access-keys)
2. Click on the button "Create Key".
Expand Down Expand Up @@ -1196,6 +1198,8 @@ docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccom

Help us make DevSpace the best tool for developing, deploying and debugging Kubernetes apps.

[![Join us on Slack!](static/img/slack.svg)](https://slack.k8s.io/#devspace)

### Reporting Issues

If you find a bug while working with the DevSpace, please [open an issue on GitHub](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Fbug&template=bug-report.md&title=Bug:) and let us know what went wrong. We will try to fix it as quickly as we can.
Expand All @@ -1204,9 +1208,9 @@ If you find a bug while working with the DevSpace, please [open an issue on GitH

You are more than welcome to open issues in this project to:

- [give feedback](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Ffeedback&title=Feedback:)
- [suggest new features](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Ffeature&template=feature-request.md&title=Feature%20Request:)
- [ask a question on Slack](https://devspace.cloud/slack)
- [Give feedback](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Ffeedback&title=Feedback:)
- [Suggest new features](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Ffeature&template=feature-request.md&title=Feature%20Request:)
- [Report Bugs](https://github.com/devspace-cloud/devspace/issues/new?labels=kind%2Fbug&template=bug-report.md&title=Bug%20Report:)

### Contributing Code

Expand Down
6 changes: 5 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,14 @@ func (cmd *InitCmd) addProfileConfig(config *latest.Config) error {
if ok && (defaultImageConfig.Build == nil || defaultImageConfig.Build.Disabled == nil) {
patchRemoveOp := "remove"
patches := []*latest.PatchConfig{
&latest.PatchConfig{
{
Operation: patchRemoveOp,
Path: "images." + defaultImageName + ".injectRestartHelper",
},
{
Operation: patchRemoveOp,
Path: "images." + defaultImageName + ".appendDockerfileInstructions",
},
}

if defaultImageConfig.Build != nil && defaultImageConfig.Build.Docker != nil && defaultImageConfig.Build.Docker.Options != nil && defaultImageConfig.Build.Docker.Options.Target != "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func openURL(url string, kubectlClient kubectl.Client, analyzeNamespace string,
defer log.StopWait()

// Make sure the ingress has some time to take effect
time.Sleep(time.Second * 2)
time.Sleep(time.Second * 5)

now := time.Now()
for time.Since(now) < maxWait {
Expand Down
7 changes: 4 additions & 3 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package cmd

import (
"fmt"
"os"
"strings"

"github.com/devspace-cloud/devspace/cmd/flags"
"github.com/devspace-cloud/devspace/pkg/devspace/dependency"
"github.com/devspace-cloud/devspace/pkg/util/factory"
flagspkg "github.com/devspace-cloud/devspace/pkg/util/flags"
"github.com/devspace-cloud/devspace/pkg/util/message"
"github.com/sirupsen/logrus"
"os"
"strings"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -60,7 +61,7 @@ devspace --dependency my-dependency run any-command --any-command-flag

// check if is help command
osArgs := os.Args[:index]
if len(os.Args) == index + 1 && (os.Args[index] == "-h" || os.Args[index] == "--help") {
if len(os.Args) == index+1 && (os.Args[index] == "-h" || os.Args[index] == "--help") {
return cobraCmd.Help()
}

Expand Down
7 changes: 6 additions & 1 deletion dist/npm/bin/devspace
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env sh

BINARY=$(command -v devspace)
STAT=$(stat --printf="%s" "$BINARY" 2>/dev/null)

if echo "${OSTYPE}" | grep -q "darwin.*"; then
STAT=$(stat -L -f%z "$BINARY" 2>/dev/null)
else
STAT=$(stat --printf="%s" "$BINARY" 2>/dev/null)
fi

if [ ! -f "$BINARY" ] || [ "$STAT" -lt 10000 ]; then
echo "Finishing installation of DevSpace CLI"
Expand Down
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ If you are using GitHub pages for hosting, this command is a convenient way to b

## Creating New Versions

### 1. Generate Command Docs
### 1. Generate Command Docs
```bash
cd ../ # main project directory
go run -mod= ./hack/gen-docs.go
```

### 2. Create Version
```bash
cd website
yarn run docusaurus docs:version 4.5
```
22 changes: 19 additions & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,26 @@ module.exports = {
target: '_self'
},
{
to: 'docs/introduction',
href: __webpack_public_path__ + 'docs/' + (process.env.NODE_ENV == 'production' ? '' : 'next/') + 'introduction',
label: 'Docs',
position: 'left'
position: 'left',
target: '_self'
},
{
href: 'https://devspace.cloud/blog',
label: 'Blog',
position: 'left'
},
{
href: 'https://slack.k8s.io/#devspace',
className: 'slack-link',
'aria-label': 'Slack',
position: 'right',
},
{
href: 'https://github.com/devspace-cloud/devspace',
label: 'GitHub',
className: 'github-link',
'aria-label': 'GitHub',
position: 'right',
},
],
Expand Down Expand Up @@ -78,6 +86,14 @@ module.exports = {
},
],
],
plugins: [
[
require.resolve('docusaurus-gtm-plugin'),
{
id: 'GTM-5KKTMWJ',
}
]
],
scripts: [
{
src:
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@docusaurus/core": "^2.0.0-alpha.50",
"@docusaurus/preset-classic": "^2.0.0-alpha.50",
"classnames": "^2.2.6",
"docusaurus-gtm-plugin": "^0.0.2",
"mdx-link-checker": "^0.0.4",
"react": "^16.8.4",
"react-dom": "^16.8.4"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/commands/devspace_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Builds all defined images and pushes them
```
--allow-cyclic When enabled allows cyclic dependencies
--build-sequential Builds the images one after another instead of in parallel
--dependency strings Builds only the specific named dependencies
-b, --force-build Forces to build every image
--force-dependencies Forces to re-evaluate dependencies (use with --force-build --force-deploy to actually force building & deployment of dependencies) (default true)
-h, --help help for build
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/commands/devspace_connect_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ devspace connect cluster
--cert-manager Deploy a cert manager (default true)
--context string The kube context to use
--domain string The domain to use
--gatekeeper Deploy the gatekeeper (default true)
--gatekeeper-rules Deploy the gatekeeper default rules (default true)
--gatekeeper Deploy the gatekeeper
--gatekeeper-rules Deploy the gatekeeper default rules
-h, --help help for cluster
--ingress-controller Deploy an ingress controller (default true)
--key string The encryption key to use
Expand Down
4 changes: 3 additions & 1 deletion docs/pages/commands/devspace_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ Run executes a predefined command from the devspace.yaml
Examples:
devspace run mycommand --myarg 123
devspace run mycommand2 1 2 3
devspace --dependency my-dependency run any-command --any-command-flag
#######################################################
```


## Flags

```
-h, --help help for run
--dependency string Run a command from a specific dependency
-h, --help help for run
```


Expand Down
Loading

0 comments on commit 71de190

Please sign in to comment.