Appearance
Create a Service From a GitHub Repository
Yelken provides a nice integration between a service in Yelken and your project located inside a GitHub repository. When you push a new commit, Yelken creates a pipeline that automatically builds and deploys your latest state of repository. Additionally, Yelken is able to create a new service or update an existing one when you open a Pull Request in your repository. This allows you to test changes in a separate service without applying changes to actual service. For this integration to work as expected, you need to complete a few steps while creating a service which will be described during this guide.
In this guide, we will create a new project from scratch. If you already have a project and want to have a service in that project, you can use Create Service button too. Whether you create a project from scratch or add a new service to an existing project, the steps are same.
To start creating a new project and a service from a GitHub repository:
Go to Create Project page. You can also access it in the Projects page by using Create Project button.
Choose GitHub Project item from the options.
If you have Yelken's GitHub App already installed, choose the repository you want to create a service from.
Otherwise Yelken will ask you to install the GitHub App. You can install it by using Install GitHub App button. While installing the App, please ensure that you give access permissions to the repositories you want to create service from. Once you install the GitHub App, you can get back to Create Project page.
In this step, you can configure various parts of your service.
4.1. Yelken requires a
Dockerfilefile to exists in your repository. Yelken uses this file to build a container image from the repository.By default, Yelken assumes that
Dockerfileis located at the root directory of the repository. Please specify the path ofDockerfilein the repository as a relative path if its path is different.4.2. Optionally, you can specify path of
Build Context. This can be useful if your project resides in a different directory.4.3. Optionally, to pass information in runtime or have a persistent volume, you can add variables and mount volumes to your service.
Choose an appropriate plan for your service.
Lastly, give a name to your project and use Create button to start creating the project and service.
After creating the project and service successfully, you will be navigated to Services page where you can see the status of your newly created service. You can view details of your service by using View Service button. In the meantime, Yelken will start a pipeline that will clone your repository, build a container image from the Dockerfile, and deploy it. You can track the state of pipelines and deployments inside the service's details page. Once pipeline succeeds, a new deployment will be created and your service will start running.