Use this guide to familiarize yourself with basic Codefresh functionality, and to get started quickly and easily.
Codefresh is a workflow platform for development teams that streamlines the entirety of the Docker images lifecycle. Codefresh allows teams to realize the benefits of improved workflow with Docker, including easy collaboration, streamlined testing, and a simplified deployment process. Although system administrators and Devops have been quick to adopt Docker, developers face a significant learning curve when trying to realize the benefits in their own swim lanes. By stitching together the entire workflow of the Docker ecosystem in an easily-consumed web interface, CodeFresh allows all stakeholders to benefit from Docker. In this way, CodeFresh brings Docker to the masses.
Services can be spun up easily from a Dockerfile in an existing repo, or from a Codefresh template that is customized to your technology stack. Because services are deployed in a production-like environment, Codefresh compositions include all of the same components your live deployment environment uses. Codefresh environments can be shared among all stakeholders by simply sharing a URL, allowing everyone from the developer, to QA, to product and project managers to instantly see the effects of each individual commit against the production stack.
- Register with Codefresh for FREE with your GitHub or Bitbucket account. Codefresh will link your repository information, and you’ll be able to add services from your current codebase.
Welcome to Codefresh! Please have a look around the platform, and e-mail us with feedback. We appreciate all feature requests, comments, and questions.
- Fork (or clone+push) our sample app repo for the purposes of this demo, or use your own repository.
- From the Codefresh console, click the
SERVICES
option on the left. - Click
ADD SERVICE
. - Choose your existing or forked Repository from step
1
, as well as your Branch, and then clickNEXT
. - Choose the Dockerfile from the Repository under
YES, IN MY REPO
. - Click
NEXT
. - Review the results and click
Close & Build
. - Click on
+'s
to see more information from the logs. + Congratulations! You’ve got your first service automatic image build set up. Whenever you push to the repository, Codefresh will automatically build your Docker image, as well as notify of any failures in the process. - Click on your avatar in the upper right corner to pull down the menu.
- Click
ACCOUNT MANAGEMENT
to access your account settings. - Click
INTEGRATION
. - Click the
CHECKBOX
next to theDOCKER ICON
, labeledEnable in order to activate docker hub integration
. - Enter your Docker Hub username and password.
- Click on
SERVICES
on the left, in the sidebar navigation. - Click on the for your new service.
- Make sure
IMAGE NAME
matches your docker hub username and repo path (e.g. docker_hub_user/repo) - Click
Push to Docker Registry
and then click Docker Hub. - Scroll down and click
SAVE
.
Great news! Your image will now be pushed to the Docker Hub registry on every successful build.
- *From here, you can view the repository triggers that have been built into containers.
- Click
IMAGES
on the left, in the sidebar navigation. - Click on the rocket icon to launch your newly built image in a container.
- Click the
+
icons to see more information about the container launch.
*You will notice that the container has failed to build, because DemoChat is expecting an instance of MongoDB to be running.
- Click
COMPOSITIONS
on the left, in the sidebar navigation. - Click
ADD NEW COMPOSITION
. - Name the new composition
micro-app
by typing it into theName
box. - Click the
+
icon to add a service to the composition. - Select the
cf-demo-micro-app
service from thePre-configured service
option. - Click
ADD
.
- *Codefresh will add a basic configuration for
cf-demo-micro-app
to the composition.
Configuration:
cf-welldone-demo_cf-demo-micro-app:
image: cf-welldone-demo/cf-demo-micro-app:master
ports:
- 3000
- Click the
+
icon to add another service to the composition. - Click
Pre-built image
. - Type
mongo
into the field. - Click
ADD
.
- *Codefresh will add a basic configuration for
mongo
to the composition.
Configuration:
cf-welldone-demo_cf-demo-micro-app:
image: cf-welldone-demo/cf-demo-micro-app:master
ports:
- 3000
mongo:
image: mongo
- Click in the text of the composition to edit it.
- Change the
ports
value to5000
. - Add a
links
line with the value ofmongo
and addenvironment
variables.
*Your composition will look like the one below:
Configuration:
cf-welldone-demo_cf-demo-micro-app:
image: cf-welldone-demo/cf-demo-micro-app:master
ports:
- 5000
links:
- mongo
environment:
MONGO_URL: mongo/cf-micro-api
PORT: 5000
mongo:
image: mongo
- Click
SAVE
. - Click the rocket icon to
LAUNCH
your composition. - Click
+'s
to see the logs and if the launch succeeded. - Click
Open App
and see your app running at the URL provided.
Now, we will add a worker service.
- Fork (or clone+push) our sample worker repo for the purposes of this demo, or use your own repository.
- From the Codefresh console, click the
SERVICES
option on the left. - Click
ADD SERVICE
. - Choose your existing or forked Repository from previous step, as well as your Branch, and then click
NEXT
. - Choose the Dockerfile from the Repository under
YES, IN MY REPO
. - Click
NEXT
. - Review the results and click
Close & Build
. - Click on
SERVICES
on the left, in the sidebar navigation. - Click on the for your new service.
- Make sure
IMAGE NAME
matches your docker hub username and repo path (e.g. docker_hub_user/repo) - Click
Push to Docker Registry
and then click Docker Hub. - Scroll down and click
SAVE
. - Click
COMPOSITIONS
on the left, in the sidebar navigation. - Click in the text of the composition to edit it.
- Click the
+
icon to add a service to the composition. - Select the
cf-demo-micro-worker
service from thePre-configured service
option. - Click
ADD
. - Change the ports value to
5000
. - Add a
links
line with the value ofmongo
and addenvironment
variables.
*Your composition will look like the one below:
Configuration:
cf-welldone-demo_cf-demo-micro-app:
image: cf-welldone-demo/cf-demo-micro-app:master
ports:
- 5000
links:
- mongo
environment:
MONGO_URL: mongo/cf-micro-api
PORT: 5000
mongo:
image: mongo
cf-welldone-demo_cf-demo-micro-worker:
image: cf-welldone-demo/cf-demo-micro-worker:master
ports:
- 5000
links:
- mongo
environment:
MONGO_URL: mongo/cf-micro-api
PORT: 5000
- Click
SAVE
. - Click the rocket icon to
LAUNCH
your composition. - Click
+'s
to see the logs and if the launch succeeded. - Click
Open App
and see your app running at the URL provided. - Back in the Codefresh admin, click
ENVIRONMENTS
, in the sidebar navigation. + From here, you can see all running Environments, and share the URLs with other stakeholders in your organization.