GithubHelp home page GithubHelp logo

electric-cloud / ec-chef Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 3.38 MB

ElectricFlow integration for Chef

License: Apache License 2.0

Makefile 0.09% Groovy 0.74% Shell 2.38% CSS 0.48% Java 27.51% Perl 64.10% Prolog 3.57% Raku 1.12%

ec-chef's Introduction

electric-cloud

Open Source landing page

ec-chef's People

Contributors

aavinashjha avatar anandjainjk avatar bva avatar horodchukanton avatar imago-storm avatar jkchew avatar justnoxx avatar nikhilv avatar pravorskyi avatar urvashisingh avatar valpere avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ec-chef's Issues

EditRole Procedure needs adjustment in terms of knife commands called and job step output

Steps to reproduce

  1. Create a role 'test-role1' as follows
{
  "name": "test-role1",
  "description": "foo",
  "json_class": "Chef::Role",
  "default_attributes": {

  },
  "override_attributes": {

  },
  "chef_type": "role",
  "run_list": [

  ],
  "env_run_lists": {

  }
}
  1. Run the EditRole procedure, change the 'description' in the json above to something like 'foo2'.
    editrole

  2. Run procedure

EXPECTED -
Role is edited and job step log reinforces that impression

ACTUAL -
Role is first deleted and then created. Job step output says 'Success: No changes applied' but the description was changed.

Side note: Do we need to issue the delete? From chef documentation it looks like we only need to issue knife role from file FILE

EditNodeDriver performs platform specific operations

See PR. Comment copied from PR

This is not platform independent and will not work on Windows. Can you instead write to current working directory (which is typically the scoped to the job)?

I would recommend taking a look at http://perldoc.perl.org/File/Temp.html . It's a good idea to always add a bit of randomness to the file name to support parallel execution. See examples in perldoc. We've used File::Temp and this pattern in other plugins.

Dockerfile for CI procedure

We use Docker for CI tests (server-side deployments) and CentOS 6.4 for machines running EF Agents.
So, to setup CI tests for this plugin, we need Dockerfile for server, and instructions for setting up client on Agent machine (CentOS 6.4).

Change parameter type for ssh_password parameter in Bootstrap

Use credential parameter instead. We should never ask for a password and store it in clear text.

For the procedure 'Bootstrap' in EC-Chef, the parameter 'ssh_password' is currently 'entry'. 'ssh_password' and 'ssh_user' can be combined into a credential parameter.

This is a blocker and the plugin cannot be shipped unless this is addressed.

Add README instructions on how to run tests

Now that we have tests can we get a little bit of a write up on how to run them?

They should be geared towards new contributors. What are the pre-reqs: what sofware needs to be installed, what files need to be created/ what information from the chef server do we need?

After writing them please use a fresh vagrant box and try out the instructions as that is ultimately what I will do (aka Acceptance criteria).

Remove use of perl global variables in new code

We should not be adding additional global variables

For the files that you've created/recently added please avoid global variables

To reproduce:
Run find . -name "*.pl" | xargs fgrep -l "$::"

find . -name "*.pl" | xargs fgrep -l "$::"
./src/main/resources/project/drivers/AddRecipesToNodeRunListDriver.pl
./src/main/resources/project/drivers/CreateNodeDriver.pl
./src/main/resources/project/drivers/DeleteSingleNodeDriver.pl
./src/main/resources/project/drivers/DownloadCookbookFromRepositoryDriver.pl
./src/main/resources/project/drivers/EditNodeDriver.pl
./src/main/resources/project/drivers/InstallCookbookOnClientDriver.pl
./src/main/resources/project/drivers/ListNodeDriver.pl
./src/main/resources/project/drivers/RemoveRecipesFromNodeRunListDriver.pl
./src/main/resources/project/drivers/RunChefClientDriver.pl
./src/main/resources/project/drivers/ShowNodeDriver.pl
./src/main/resources/project/drivers/UploadCookbooksToServerDriver.pl
./src/main/resources/project/postp_matchers.pl

Ideally this find + fgrep command would return no results. But this issue to keep track of the global vars being introduced into the new features

ListRole Procedure should be plural "ListRoles"

There is a discrepancy between what we write in the job output and the name of the name of the procedure.

plurallistrole

singularlistrole

Seeing as we are listing all roles, I vote for changing the procedure name to "ListRoles"

README needs to be updated with prerequisites for running tests

Will update this description as I find out more.

  • Had to install ChefDK
  • Had to write validator.pem and chef server url in knife.rb.

Acceptance criteria-

After reading the README a user should be able to successfully run all tests on a fresh linux box (after following the instructions).

Unit tests and integration tests distinction

With gradle plugin, we have three tasks for tests, one for integration tests (systemtest) and two others for unit testing of perl and java (GWT) code (unittest & test).

Solely purpose of unit tests is to make them run as fast as possible, and independent from working environment (Flow Server & Agent).

For integration testing (which use EF & Agent), we have separate tests, which are based on ntest framework, and which we are actively using in our CI procedures.

I've made modifications to support java-based system tests in or new CI system, but please, note, that system tests is more preferred way for us to do integration testing. So, in future, please, use ntest framework. Ask me, if you have any questions on how to setup CI tests with ntest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.