Appearance
Service
Service enables you to run your containerized workloads in an environment, such as web application, database or cache server. Yelken allows you to create services from different sources:
- From GitHub Repository: By creating a service from a GitHub repository, Yelken will continuously build and deploy your service as you push new commits to your repository. Additionally, Yelken can create or update a service when you open Pull Request in the repository to test the changes without affecting the actual service,
- From Container Image: By specifying a container image url, you can easily run a containerized workload,
- From Web Application: By using a web application managed by Yelken, you can quickly create a website. An example web app is WordPress.
INFO
An upcoming feature about service resource is that you can sync configuration of a service in one environment to another environment.
This allows testing changes in development environment and then pushing them to production without forgetting the applied changes.
To view services that belong to an environment:
- Open a project by choosing it in Projects page,
- Use Services link in the sidebar located at left.
- Additionally, change selected Environment displayed at the top bar to view services in different environment.
TIP
Services page is opened by default when you open a project and first environment will be selected.
Creating Service
As mentioned at the beginning of this page, Yelken supports a few kind of source to create a service from. To create a new service:
Go to Services page and use the Create Service button to reach to the page where you can create service.
Choose the kind of service from the options.
If you choose GitHub Project item from the options.
3.1. 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 Service page.
3.2. In this step, you can configure various parts of your service.
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.Optionally, you can specify path of
Build Context. This can be useful if your project resides in a different directory.Optionally, to pass information in runtime or have a persistent volume, you can add variables and mount volumes to your service. For more information, please look at Variables and Volume pages.
If you choose Website item from the options.
4.1. Choose the web application you want to create your website from. For more information, please look at Applications page.
If you choose Container Image item from the options.
5.1. Specify the URL of your container image.
For images located inside Docker Hub, you can specify just the repository of your image with tag such as
nginx:stable. For images stored outside of Docker Hub, you need to specify the full URL such asregistry.example.com/nginx:stable.5.2. Optionally, to pass information in runtime or have a persistent volume, you can add variables and mount volumes to your service. For more information, please look at Variables and Volume pages.
When you completed service specific steps mentioned above, you can choose an appropriate plan for your service.
Lastly,
7.1. Give a name to your service.
7.2. If you have more than one environment in your project, choose an environment.
7.3. Use Create button to start creating the service.
After creating the service successfully, you will be navigated to service's details page where you can see the details of your newly created service. You can track the state of deployments and running instances of your service inside the page.
Cloning Service
It is possible to clone a service from one environment to another environment. This enables you to seamlessly start running your services in another environment.
To clone a service, navigate to Services page, for the service you want to clone, use the context button shown as three vertical dots to open context menu and select Clone button. Then you need to provide a few information:
- Environment: choose the target environment you want to clone your service into,
- Plan: choose an appropriate plan according to your needs.
After providing required information, use the Clone button to start cloning. Yelken will clone all configurations of your service, including any volume attached to it, and create in the specified environment.
Service States
A service has a state that enables tracking its current status. It can be in one of these states:
- Creating or Initializing: A service starts its life in this state and indicates that resources are being allocated and it is being initialized.
- Running: Indicates that containers of the service are running.
- Updating: Service is being updated as a result of an applied change.
- Terminating: Service's containers are being terminated.
- Completed: Service's containers are terminated.
- Deleting: Service is being deleted as a result of user request.
- Error: A service can result in error due to one of these reasons:
- Failed Pulling Image: Yelken has failed to pull the image for the container. This could be due to a non existing image or insufficient permission. You may want to check the credentials of container registry if you use one.
- Crashing: Container is crashing in a loop. You may want to check the service logs to inspect the issue.
- Unknown: An unknown error has occured.
Service Details
Inside the Services page, you can use View Service button of a service to view its details. When you view the service, Overview will welcome you where you can see:
- Deployments with running instances,
- Latest pipelines that target the service,
- Network summary of the service
Other than the overview page, there are other subpages in which you can configure and inspect different aspect of the service.
- Deployment to list current and older deployments of the service. You can also switch to an older deployment if current one fails.
- Runtime Settings to configure runtime settings of the service, such as variables, volume mount points and container image.
- Network to configure network settings of the service.
- Actions to run actions on the service.
- Logs to inspect the logs of the service.
- Metrics to observe some helpful metrics about the service.
- Settings to update name and plan of a service.
You can check the corresponding documentation page to learn more about them.
Plans
Inside the Settings page, you can change the plan of a service according to your needs. As an example, you can choose a plan with a low cost for development environments and use a plan that gives higher compute power in production for your services.
While normal services allow you to change their plan, application services only allow upgrading the plan and disallow downgrading. This is due to the fact that size of volume provided with application services cannot be shrunk. However, it is planned to alleviate this limitation in the future.
For more information about plans, please check Pricing documentation.
Deleting Service
Inside the Settings page, under the Danger Zone section, you can use Delete Service button to delete your service. It will require a confirmation from you by asking you to enter the name of service and its key.
⚠️ Please be careful
All resources belonging to the service will be deleted immediately once you confirm the deletion. There is no going back after confirming the deletion!