Commit Graph

143 Commits

Author SHA1 Message Date
Charlie Drage
21810ad5fb Temporarily remove buildconfig tests for OpenShift
Temporarily remove these until we get buildconfig tests working.
2017-08-09 10:40:37 -04:00
Anush Shetty
abdf773908 Fix OpenShift tests for build and push 2017-08-09 19:15:44 +05:30
Charlie Drage
86c047d9ef Merge pull request #738 from cdrage/add-cpus
Add CPU limit, CPU Reservation and Memory Reservation
2017-08-08 10:07:59 -04:00
Charlie Drage
992dd53434 Exit 1 not Exit 0
Wrong exit value
2017-08-04 11:19:37 -04:00
Charlie Drage
3b59d9b615 Merge pull request #731 from cdrage/add-cluster-tests
Adds Kubernetes cluster tests
2017-08-04 11:13:27 -04:00
Charlie Drage
af26b797a2 Add CPU limit, CPU Reservation and Memory Reservation
This adds support for CPU limit, CPU reservation as well as memory
reservation.

Specifically, when using the `deploy` key in Docker Compose.
2017-08-03 09:41:14 -04:00
Charlie Drage
21fefaed0c Adds Kubernetes cluster tests
This adds cluster tests for "kompose up" and "kompose down" for
Kubernetes. At the moment this checks that they are deployable to a
single-node Kubernetes cluster.

More proficient tests such as testing if the pods are actually up will
be added in the future.

You can test this by running: `make test-ci` on your local-machine.

Furthermore, we'll eventually have this enabled on Fabric8 / CentOS CI /
Semaphore (whatever comes first) so we can have a full end-to-end
testing environment.
2017-07-28 10:39:27 -04:00
Suraj Narwade
d5a5f42d8b Handling Volume at early stage
It will resolve #544 as well as refactor volume handling part.
2017-07-26 19:59:05 +05:30
Charlie Drage
0c5cfaad84 Update release script with properly formatted table
Updates the script to properly format the table (had a bit of a
shortcoming doing that) as well as remove the leftover file
install_guide.txt as it's generated for release notes.
2017-07-20 12:21:40 -04:00
Charlie Drage
1b92344f7e Update the release script
Updates the release script with SHA256 sums, installation guide as well
as a switch to kubernetes from kubernetes-incubator.
2017-07-20 11:39:13 -04:00
Charlie Drage
df9e0340af Update doc script
Redirection works for http://kompose.io/docs/conversion/ but not for
http://kompose.io/docs/conversion.md which is what I originally
intended.

This PR updates the script to redirect all `.md` doc links.
2017-07-17 10:42:10 -04:00
Charlie Drage
796313f626 Merge pull request #704 from cdrage/graduate-from-incubator
kubernetes-incubator -> kubernetes
2017-07-12 16:49:55 -04:00
Charlie Drage
787b7d9261 kubernetes-incubator -> kubernetes
Today, we graduate from the incubator, thus all links are updates from
kubernetes-incubator to kubernetes
2017-07-12 15:42:13 -04:00
Charlie Drage
f33745701e Fix redirection site issues
Fixes the issues in regards to rediction.

For example, supplying `/docs/conversion` within the user guide the link
will appear as a 404.

Adding this allows redirection from `/docs/conversion` to `/conversion`.
2017-07-10 15:13:53 -04:00
Charlie Drage
b8d64ea336 Merge pull request #677 from cdrage/its-2017
2016 -> 2017 for licensing
2017-07-07 10:10:02 -04:00
Suraj Narwade
9dcb2bfba6 added support for restart-policy keys in v3
Resolves `restart_policy` from issue #644
2017-07-06 17:44:19 +05:30
Suraj Narwade
041d7f7d61 Added support for replicas keys in v3
resolves #644 `replicas` key
2017-07-04 12:40:12 +05:30
Anush Shetty
de5cdfa6a2 OpenShift Tests for the build and push
This patch fixes the broken buildconfig functional tests
2017-06-30 14:45:39 +05:30
Charlie Drage
ce32bb817d 2016 -> 2017 for licensing
New year, update to the license.
2017-06-28 10:49:52 -04:00
Charlie Drage
cf39f78435 Merge pull request #653 from cdrage/remove-dab
Disable dab
2017-06-21 07:39:59 -04:00
Tomas Kral
ef8c7a7a0a
fix env substitution for docker compose v3 2017-06-20 15:16:12 +02:00
Charlie Drage
b8a46895a6 Disable DAB
See issue: https://github.com/kubernetes-incubator/kompose/issues/390

Disable DAB as it is hard to maintain / not much usage / DAB is still
experimental in Docker and there hasn't been much movement:
https://github.com/moby/moby/issues/26876

MarkDeprecated does not work at the moment due to issue:
https://github.com/kubernetes-incubator/kompose/issues/652

However, that is not a blocker as we `fatalF` within `ValidateFlags`
2017-06-20 09:02:53 -04:00
Charlie Drage
ee7961216f Merge pull request #603 from procrypt/error_with_volume_name
PVC name changes if volumes containes .(dot) in it
2017-06-19 09:39:59 -04:00
Abhishek
c8881f5aa4 update created artifacts for k8s and openshift
update created artifacts for kubernetes and openshift so that env variables are populated in a particular order
2017-06-16 12:35:27 +05:30
Suraj Deshmukh
f823a22e64 Merge pull request #590 from surajnarwade/label-fix
Failing when port is specified with labels
2017-06-15 14:56:30 +05:30
Suraj Narwade
209cda28d2 Failing when port is specified with labels
Resolves #522
Kompose will give FATAL error if labels are given but ports are not defined
2017-06-15 09:30:01 +05:30
Charlie Drage
e2f9084003 Adds both build and push support
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.

Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
2017-06-14 10:19:12 -04:00
Abhishek
c40bb4bb3a change volume name with generated deployment file
if volumes in docker file is defined as
      volumes:
        - .:/code
    Then the PVC created by kompose will containes .(dot) in it.
       .-persistentvolumeclaim.yaml
2017-06-14 14:31:07 +05:30
Tomas Kral
89cf88f665 Merge pull request #638 from surajnarwade/show-diff
Failing test will show diff
2017-06-14 09:28:30 +02:00
Suraj Deshmukh
3be76ff32b Merge pull request #600 from cdrage/add-v3-support
Add v3 support of Docker Compose
2017-06-14 10:59:05 +05:30
Charlie Drage
2b58307191 Add v3 support
This does a major refactor on the compose.go functions as well as brings
in a new era of v3 support to Kompose.

Similar to how we utilize libcompose, we utilize docker/cli's "stack
deploy" code which has a built-in v3 parser. We convert the parsed
structure to our own and then convert it to Kubernetes/OpenShift
artifacts.
2017-06-13 09:44:48 -04:00
Suraj Narwade
883d11c049 Failing test will show diff
If test in `make test-cmd` is failing, now it will show diff so that
it will be easy to debug.

for example,

```
===> Starting test <===
convert::expect_success_and_warning: Running: 'kompose -f /home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/docker-compose.yml convert --stdout -j' expected_output: '/home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/output-k8s.json' expected_warning: 'Unsupported root level volumes key - ignoring'
WARN Unsupported root level volumes key - ignoring
WARN Unsupported depends_on key - ignoring
103c103
<                     "value": "bitnami_wordpres"
---
>                     "value": "bitnami_wordpress"
FAIL: converted output does not match
```
2017-06-13 14:20:52 +05:30
Tomas Kral
aa84680d6e Merge pull request #588 from ashetty1/kompose_labels_test
Adding tests for kompose-specific labels and buildconfig dockerfile construct
2017-06-08 15:09:51 +02:00
Charlie Drage
b76ed55f82 Fix adding Jekyll format to the top
Problem with `/permalink/`. This adds a few bash lines that updates
index.md without the permalink.
2017-06-02 10:05:18 -04:00
Tomas Kral
60f46fc65e Merge pull request #628 from cdrage/update-docs-with-index
Update documentation to reflect quickstart
2017-06-02 13:14:54 +02:00
Charlie Drage
ea95f0a912 Update documentation to reflect quickstart
Adds quickstart.md from the kompose.io site as well as incorporates
changes so that you can update the index page of Kompose.io via
quickstart.md
2017-06-01 15:35:05 -04:00
Anush Shetty
fb0966f9e3 Changes to make the tests work with emptyvols 2017-05-31 15:59:52 +05:30
Suraj Narwade
581e181967 Validate dockerfilepath in buildconfig
This PR will resolve #594 by validating dockerfilepath based on whether
it is relative path or not.
2017-05-30 16:31:20 +05:30
Anush Shetty
b48b250de2 Merge remote-tracking branch 'upstream/master' into kompose_labels_test 2017-05-30 15:11:22 +05:30
Charlie Drage
270d9e779b Update version number in setup.md file in release script
This change updates setup.md to include the new version number when
doing a release.
2017-05-25 11:41:02 -04:00
Anush Shetty
5f34c7368c Merge remote-tracking branch 'upstream/master' into kompose_labels_test 2017-05-25 12:19:02 +05:30
Anush Shetty
d2ad889367 Merge remote-tracking branch 'origin/master' into kompose_labels_test 2017-05-25 12:18:29 +05:30
Anush Shetty
43fa4a3fa6 Adding tests for kompose-specific labels and buildconfig dockerfile construct
* Two new scripts testing kompose-specific labels have been added:
	script/test_in_openshift/tests/routes-service-expose-hostname.sh
	script/test_in_openshift/tests/routes-service-expose-true.sh

* Tests for buildconfig dockerfile construct has been added:
	script/test_in_openshift/tests/buildconfig_dockerfile.sh

* Tests for restart option:
	script/test_in_openshift/tests/restart-options.sh

* Ability to run individual scripts: Changes have been made to script/test_in_openshift/run.sh
  for running individual scripts:

	Eg. ./script/test_in_openshift/run.sh script/test_in_openshift/tests/routes-service-expose-true.sh
2017-05-25 12:04:51 +05:30
Suraj Deshmukh
1c64b016dc Merge pull request #592 from cdrage/change-git-command
Use old git command
2017-05-18 09:12:09 +05:30
Tomas Kral
792976da1f
some of created objects were missing io.kompose.service label
label added to BuildConfig, DaemonSet, ReplicationController, Deployment and Pod
2017-05-16 17:56:32 +02:00
Suraj Narwade
8fc262bd99 Add build_args support in buildconfig
now args provided under build in docker-compose file can be available in buildconfig.
it solves #406
Added unit test and functional test
solves #445
Separated key:"value" pairs by spaces
2017-05-16 12:19:00 +05:30
Charlie Drage
f0c4addbaf Use old git command
Some versions of git don't have git-url (case in point on Debian 8, no
get-url on packaged git).

Use old command in getting URL.
2017-05-09 08:55:55 -04:00
Suraj Narwade
aacde86eb9 Fixes fixture test for build context
Resolves #576

This PR includes `output-os-template.json` in `nginx-node-redis` example,
which is basically output template contains `%URI%` and `%REF%` variables
which will be filled while initializing test cases and new will be stored as
`/tmp/output-os.json`
This will remove the problem of git uri and ref.
2017-05-08 17:54:24 +05:30
Tomas Kral
abf81926c0 Merge pull request #460 from ashetty1/openshift_up_down_test
Adding kompose up/down tests for openshift
2017-05-02 13:35:55 +02:00
Anush Shetty
1b3d876a62 Adding OpenShift functional tests for kompose up/down
* This PR adds functional tests for kompose up/down. The test scripts
are hosted under script/test_in_openshift. The directory structure,
as follows:

	script/test_in_openshift/
	├── compose-files
	│   └── docker-compose-command.yml
	├── lib.sh
	├── run.sh
	└── tests
		├── buildconfig.sh
    		├── entrypoint-command.sh
    		├── etherpad.sh
    		└── redis-replica-2.sh

* script/test_in_openshift/run.sh is the master script
  which executes all the tests

* script/test_in_openshift/lib.sh consists of helper functions
  for `kompose up` and `kompose down` checks

* script/test_in_openshift/tests directory consists of test scripts

* The scripts use 'oc cluster up' for setting up a single-machine
  OpenShift cluster. It exits if oc binaries are not installed

* Most of the docker compose files used are the ones already
  available in examples/ or script/test/fixtures.

* How to run the tests: 'make test-openshift'
2017-05-02 12:02:30 +05:30