Skip to content

Commit

Permalink
Merge pull request #13 from kubero-dev/release/v1.3.0
Browse files Browse the repository at this point in the history
Release/v1.3.0
  • Loading branch information
mms-gianni authored Dec 4, 2022
2 parents 459dfa8 + c4fca66 commit 492bcd3
Show file tree
Hide file tree
Showing 18 changed files with 1,383 additions and 170 deletions.
31 changes: 23 additions & 8 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
PORT=2000
# git deployment key's
KUBERO_WEBHOOK_SECRET=mysecret

# Github webhook configuration
# webhook configuration
KUBERO_WEBHOOK_URL=https://kuberoXXXXXXXXXXXXX.loca.lt/api/repo/webhooks
GITHUB_PERSONAL_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

#GITEA_PERSONAL_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#GITEA_BASEURL=http://localhost:3000

KUBECONFIG_PATH=./kubeconfig
KUBERO_CONFIG_PATH=./config.yaml
KUBERO_CONTEXT=kind-kubero
KUBERO_NAMESPACE=kubero-dev
KUBERO_SESSION_KEY=randomString
DEBUG=*.*

##########################################
# git repository configuration
#
#GITHUB_PERSONAL_ACCESS_TOKEN=

#GITEA_PERSONAL_ACCESS_TOKEN=
#GITEA_BASEURL=http://localhost:3000

#GOGS_PERSONAL_ACCESS_TOKEN=
#GOGS_BASEURL=http://localhost:3000

#GITLAB_BASEURL=http://localhost:3080
#GITLAB_PERSONAL_ACCESS_TOKEN=glpat-

#BITBUCKET_USERNAME=XXXXXXXXX
#BITBUCKET_APP_PASSWORD=


################################################
# authentication section
#
#GITHUB_CLIENT_SECRET=
#GITHUB_CLIENT_ID=
#GITHUB_CLIENT_CALLBACKURL=http://kubero.lacolhost.com/api/auth/github/callback
Expand All @@ -26,5 +43,3 @@ KUBERO_SESSION_KEY=randomString
#OAUTH2_CLIENT_ID=
#OAUTH2_CLIENT_SECRET=
#OAUTH2_CLIENT_CALLBACKURL=http://kubero.lacolhost.com/api/auth/oauth2/callback

DEBUG=*.*
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# How to contribute

All contributions are welcome. For simple typos, just open a PR.
For bigger ideas it might be better to open a issue first before you put a lot of work into it. This way we can discuss the idea first.
For bigger ideas it might be better to open a issue first before you put a lot of work into it.

Want to contribute, but dont know where to start? Have a look into the Roadmap.

## Development setup
### Requirements
Expand Down
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<hr>
<br>

![GitHub](https://img.shields.io/github/license/kubero-dev/kubero?style=flat-square)
![GitHub package.json version](https://img.shields.io/github/package-json/v/kubero-dev/kubero?style=flat-square)
![GitHub](https://img.shields.io/github/license/kubero-dev/kubero?style=flat-square&color=brightgreen)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/kubero-dev/kubero?style=flat-square&color=brightgreen)

<br>
Kubero brings the convinience of Heroku to your kubernetes cluster. Your developers should not need to worry about the underlying infrastructure and deployment. It enables you to deploy your applications within some clicks. It also provides a dashboard and CLI to manage your applications.
<br>
Kubero brings the convinience of Heroku/platform.sh to your kubernetes cluster. Your developers should not need to worry about the underlying infrastructure and deployment.
<br>
Kubero is Kubernetes native and runs on every Kubernetes.
<br>
<br>
Kubero runs as a operator and has a UI, API and soon a CLI.


## What can Kubero do for you?
- Create a CI pipeline with up to 4 separate environments for all your applications: review apps -> testing -> stageing -> production
Expand All @@ -30,9 +30,8 @@ Kubero runs as a operator and has a UI, API and soon a CLI.
- Install and manage your operators
- Give access to your container CLI

## Which heroku features are still missing?
- Dataclips
- CLI (Work in progress: https://github.com/kubero-dev/kubero-cli )
## Supported GIT repositories
<img src="docs/screenshots/gitrepositories.png">

## Which languages are supported
Basicly *everything* that can be shipped in a single container. Kubero uses official images to build and run the apps. But they can be replaced or extended to fit your needs.
Expand All @@ -47,26 +46,39 @@ So far tested languages/frameworks:
- Rust (including Rocket)
- ...

## Preconfigured Buildpacks
You find the preconfigured buildpacks and examples here:
https://github.com/kubero-dev/buildpacks

## Quickstart
1) Download and unpack the Kubero CLI <a href="https://github.com/kubero-dev/kubero-cli/releases/latest">here</a><p>
1) Download and unpack the <a href="https://github.com/kubero-dev/kubero-cli/releases/latest">Kubero CLI</a><p>
2) Run `kubero install` to install all components on your cluster

## Screenshots
<a href="https://github.com/kubero-dev/kubero/tree/main/docs/screenshots">more Screenshots</a><p>
<img src="docs/screenshots/createapp.gif">

# Usage
## Usage
1. Create a pipeline with all your phases
2. Connect the Pipeline to your git repository ( not required with pre-build image deployment )
2. Connect the Pipeline to your git repository (Github, Bitbucket, Gitlab, Gitea, Gogs)
3. Create your apps with cronjobs and addons

# Full documentation
## Documentation
https://github.com/kubero-dev/kubero/wiki

## Stargazers over time
## Roadmap
https://github.com/orgs/kubero-dev/projects/1/views/3

## Contributing
All contributions are welcome!
- Open an issue
- Add a feature or open a feature request
- Discuss ideas in the discussions
- Fix typos
- Contribute code
- Write articles

## Support
Staring this projects helps a lot. ⭐ Thank you!

[![Stargazers over time](https://starchart.cc/kubero-dev/kubero.svg)](https://starchart.cc/kubero-dev/kubero)
[![Stargazers over time](https://starchart.cc/kubero-dev/kubero.svg)](https://starchart.cc/kubero-dev/kubero)
94 changes: 65 additions & 29 deletions client/src/components/apps/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,52 +49,65 @@
<!-- DEPLOYMENT-->
<h4 class="text-uppercase">Deployment</h4>

<v-row>
<v-col
cols="12"
md="6"
>
<v-switch
v-model="deploymentstrategyGit"
:label="`Deployment strategy: ${appDeploymentStrategy}`"
color="primary"
inset
></v-switch>
</v-col>
</v-row>

<v-row
v-if="this.pipelineData.deploymentstrategy == 'git'">
v-if="appDeploymentStrategy == 'git'">
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="pipelineData.git.repository.ssh_url"
:rules="repositoryRules"
:counter="60"
label="Repository"
required
disabled
></v-text-field>
</v-col>
</v-row>
<v-row
v-if="this.pipelineData.deploymentstrategy == 'git'">
v-if="appDeploymentStrategy == 'git'">
<v-col
cols="12"
md="6"
>
<v-text-field
<v-combobox
v-model="branch"
:rules="branchRules"
:counter="60"
:items="branchesList"
label="Branch"
required
></v-text-field>
></v-combobox>
</v-col>
</v-row>
<v-row
v-if="this.pipelineData.deploymentstrategy == 'git'">
v-if="appDeploymentStrategy == 'git'">
<v-col
cols="12"
md="6"
>
<v-switch
v-model="autodeploy"
:label="`Autodeploy: ${autodeploy.toString()}`"
inset
></v-switch>
</v-col>
</v-row>

<v-row
v-if="this.pipelineData.deploymentstrategy == 'docker'">
v-if="appDeploymentStrategy == 'docker'">
<v-col
cols="12"
md="6"
Expand All @@ -104,19 +117,17 @@
:counter="60"
label="Docker image"
required
disabled
></v-text-field>
</v-col>
</v-row>
<v-row
v-if="this.pipelineData.deploymentstrategy == 'docker'">
v-if="appDeploymentStrategy == 'docker'">
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="docker.tag"
:rules="branchRules"
:counter="60"
label="Tag"
required
Expand Down Expand Up @@ -235,6 +246,7 @@
<v-switch
v-model="autoscale"
:label="`Autoscale: ${autoscale.toString()}`"
inset
></v-switch>
</v-col>
</v-row>
Expand Down Expand Up @@ -484,16 +496,14 @@ export default {
data: () => ({
valid: false,
buildpack: undefined,
/*
buildpackDisabled: true,
buildpackList: [
"Docker",
"NodeJS",
//"Python",
//"Ruby",
],
*/
pipelineData: {},
deploymentstrategyGit: true,
pipelineData: {
git: {
repository: {
ssh_url: "",
}
},
},
appname: '',
resourceVersion: undefined,
/*
Expand All @@ -507,6 +517,7 @@ export default {
ssh_url: '[email protected]:kubero-dev/template-nodeapp.git',
},
branch: 'main',
branchesList: [],
docker: {
image: 'ghcr.io/kubero-dev/template-nodeapp',
tag: 'main',
Expand Down Expand Up @@ -559,15 +570,10 @@ export default {
],
repositoryRules: [
//v => !!v || 'Repository is required',
v => v.length <= 60 || 'Repository must be less than 10 characters',
v => v.length <= 60 || 'Repository must be less than 60 characters',
// ((git|ssh|http(s)?)|(git@[\w\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git)(/)?
v => /((git|ssh|http(s)?)|(git@[\w.]+))(:(\/\/)?)([\w.@:/\-~]+)(\.git)(\/)?/.test(v) || 'Format "owner/repository"',
],
branchRules: [
//v => !!v || 'Branch is required',
v => v.length <= 60 || 'Name must be less than 60 characters',
v => /^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(v) || 'Allowed characters : [a-zA-Z0-9_-]',
],
domainRules: [
v => !!v || 'Domain is required',
v => v.length <= 60 || 'Name must be less than 60 characters',
Expand All @@ -584,6 +590,13 @@ export default {
],
*/
}),
computed: {
// a computed getter
appDeploymentStrategy() {
// `this` points to the component instance
return this.deploymentstrategyGit ? 'git' : 'docker'
}
},
mounted() {
this.loadApp();
this.loadPodsizeList();
Expand All @@ -605,6 +618,8 @@ export default {
this.buildpack = this.pipelineData.buildpack;
this.gitrepo.ssh_url = this.pipelineData.git.repository.ssh_url;
this.loadBranches();
/*
if (this.app == 'new') {
switch (this.pipelineData.github.repository.language) {
Expand All @@ -623,6 +638,23 @@ export default {
*/
});
},
loadBranches() {
// encode string to base64 (for ssh url)
const gitrepoB64 = btoa(this.pipelineData.git.repository.ssh_url);
const gitprovider = this.pipelineData.git.provider;
axios.get('/api/repo/'+gitprovider+"/"+gitrepoB64+"/branches/list").then(response => {
for (let i = 0; i < response.data.length; i++) {
this.branchesList.push({
text: response.data[i],
value: response.data[i],
});
}
});
},
loadPodsizeList() {
axios.get('/api/config/podsize').then(response => {
for (let i = 0; i < response.data.length; i++) {
Expand Down Expand Up @@ -667,13 +699,15 @@ export default {
axios.get(`/api/pipelines/${this.pipeline}/${this.phase}/${this.app}`).then(response => {
this.resourceVersion = response.data.metadata.resourceVersion;
this.deploymentstrategyGit = response.data.spec.deploymentstrategy == 'git';
this.appname = response.data.spec.name;
this.buildpack = response.data.spec.buildpack;
this.gitrepo = response.data.spec.gitrepo;
this.branch = response.data.spec.branch;
this.imageTag= response.data.spec.imageTag;
this.docker.image = response.data.spec.image.repository || '';
this.docker.tag = response.data.spec.image.tag || 'main';
this.docker.tag = response.data.spec.image.tag || 'latest';
this.autodeploy = response.data.spec.autodeploy;
this.domain = response.data.spec.domain;
this.envvars = response.data.spec.envVars;
Expand All @@ -696,6 +730,7 @@ export default {
appname: this.appname,
gitrepo: this.pipelineData.git.repository,
branch: this.branch,
deploymentstrategy: this.appDeploymentStrategy,
image : {
containerport: this.containerPort,
repository: this.docker.image,
Expand Down Expand Up @@ -745,6 +780,7 @@ export default {
appname: this.appname.toLowerCase(),
gitrepo: this.pipelineData.git.repository,
branch: this.branch,
deploymentstrategy: this.appDeploymentStrategy,
image : {
containerport: this.containerPort,
repository: this.docker.image,
Expand Down
Loading

0 comments on commit 492bcd3

Please sign in to comment.