Skip to content

Commit

Permalink
Merge pull request #394 from yc-actions/v2
Browse files Browse the repository at this point in the history
V2
  • Loading branch information
nikolaymatrosov authored Jun 20, 2023
2 parents d025ce1 + ecc7fa0 commit ac0a15a
Show file tree
Hide file tree
Showing 10 changed files with 415,824 additions and 64,329 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ using the provided image name and tag.
- name: Deploy COI VM
id: deploy-coi
uses: yc-actions/yc-coi-deploy@v1
uses: yc-actions/yc-coi-deploy@v2
env:
CR_REGISTRY: crp00000000000000000
CR_REPOSITORY: my-cr-repo
IMAGE_TAG: ${{ github.sha }}
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: bbajn5q2d74c********
VM-name: yc-action-demo
vm-name: yc-action-demo
vm-service-account-id: ajeqnasj95o7********
vm-cores: 1
vm-memory: 512Mb
vm-cores: 2
vm-memory: 2Gb
vm-core-fraction: 100
vm-subnet-id: e9b*********
user-data-path: './user-data.yaml'
Expand All @@ -60,6 +60,25 @@ See [action.yml](action.yml) for the full documentation for this action's inputs

To perform this action, it is required that the service account on behalf of which we are acting has granted the `compute.admin` role or greater.

## Debug
There are two ways to provide info about container to deploy to the `yc-container-daemon` installed inside COI image:
1. Pass container declaration via `docker-container-declaration` metadata key.
2. Pass docker-compose.yaml via `docker-compose` metadata key.

But if both of these keys defined in the VM metadata deamon doesn't know what config it should use and fail with following exception:
```json
{
"level":"ERROR",
"ts":"2023-06-01T01:23:45.000Z",
"caller":"mdtracking/checker.go:135",
"msg": "OnChange callbak failed: both 'docker-compose' and 'docker-container-declaration' are found in metadata, only one should be specified"
}
```
So the action detects the conflict and fails if there is `'docker-container-declaration'` in the metadata of the provided pre-created VM.

To fix the issue you should either let the action to create new VM by removing `name` param or recreate VM using
`'docker-compose'` method.

## License Summary

This code is made available under the MIT license.
Loading

0 comments on commit ac0a15a

Please # to comment.