Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge hardware and target. #88

Merged
merged 8 commits into from
May 9, 2020

Conversation

parauliya
Copy link
Contributor

@parauliya parauliya commented Apr 30, 2020

Now while creating a workflow you can directly provide hardware/devices mac addr.
And now there is no need of targets. This approach will support both single and multiple workers as well:

Current template look like this for worker field: ( Has the Target reference )

  • worker: "{{index .Targets "machine1" "mac_addr"}}"

After this PR the template will look like this for worker field: (Target reference not required)

  • worker: {{.device_1}}

Right Now the workflow create command is as follows for single and multiple worker: ( Has the Target reference )

  • tink workflow create -t <temp-id> -r <target-id>

After this PR the workflow create command it will look like: ( Target reference not required )

  1. For single worker
    tink workflow create -t <template_id> -r '{ "device_1": "mac/IP/Id" }'

  2. For Multiple worker you can just increase the key value pair in the workflow create command:
    tink workflow create -t <template_id> -r '{ "device_1": "mac/IP", "device_2": "mac/IP"}'

Note: In the above case user can replace the keys device_1/device_2 with any name which should contain only letters, numbers and Underscore and should be in sync with template.

@parauliya parauliya added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge Signal to Mergify to block merging of the PR. labels Apr 30, 2020
@gauravgahlot gauravgahlot removed the do-not-merge Signal to Mergify to block merging of the PR. label Apr 30, 2020
@parauliya parauliya linked an issue Apr 30, 2020 that may be closed by this pull request
parauliya and others added 4 commits May 5, 2020 14:37
Now while creating a workflow you can directly provide hardware/devices mac addr.
And now there is no need of targets.
Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>
Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>
Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>
@parauliya parauliya changed the title [WIP] : Merged hardware and target. Merged hardware and target. May 5, 2020
@parauliya parauliya marked this pull request as ready for review May 5, 2020 12:53
grpc-server/workflow.go Show resolved Hide resolved
cli/tink/cmd/workflow/create.go Outdated Show resolved Hide resolved
cli/tink/cmd/workflow/create.go Outdated Show resolved Hide resolved
cli/tink/cmd/workflow/create.go Show resolved Hide resolved
grpc-server/workflow.go Outdated Show resolved Hide resolved
grpc-server/workflow.go Outdated Show resolved Hide resolved
test/framework/utils.go Show resolved Hide resolved
@mmlb mmlb changed the title Merged hardware and target. Merge hardware and target. May 7, 2020
Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@parauliya parauliya requested review from gauravgahlot and removed request for nathangoulding May 9, 2020 09:25
@gauravgahlot gauravgahlot merged commit c2b0989 into tinkerbell:master May 9, 2020
@gauravgahlot gauravgahlot deleted the remove_target branch May 9, 2020 09:30
@alexellis
Copy link
Contributor

Does this mean that the target creation is no longer required?

mmlb pushed a commit to mmlb/tinkerbell-tink that referenced this pull request May 21, 2020
* Merged hardware and target.

Now while creating a workflow you can directly provide hardware/devices mac addr.
And now there is no need of targets.

* using hello-world as the first example

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* fixes

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* moved comments out of data JSON

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* Changed the way of writing template and creating workflow

* Updating the docs with current implementation

* Incorporated some minor review comments

Co-authored-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>
parauliya added a commit to infracloudio/tink that referenced this pull request May 22, 2020
* Merged hardware and target.

Now while creating a workflow you can directly provide hardware/devices mac addr.
And now there is no need of targets.

* using hello-world as the first example

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* fixes

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* moved comments out of data JSON

Signed-off-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>

* Changed the way of writing template and creating workflow

* Updating the docs with current implementation

* Incorporated some minor review comments

Co-authored-by: Gaurav Gahlot <gaurav.gahlot19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unify hardware/target data model
4 participants