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

[FEATURE REQUEST] Allow to check on VMs which epicli version was used to deploy/upgrade components #1306

Closed
11 of 13 tasks
rafzei opened this issue May 29, 2020 · 9 comments
Closed
11 of 13 tasks
Assignees
Labels
priority/high Task with high priority python Pull requests that update Python code type/improvement type/low-hanging-fruit Good, nice, simple task

Comments

@rafzei
Copy link
Contributor

rafzei commented May 29, 2020

Is your feature request related to a problem? Please describe.
Right now we can recognize the version of epicli by specific k8s version on masters/nodes.

Describe the solution you'd like
We want to dump the version number of executed epicli on cluster components (VMs) to easily recognize which version is deployed. We can also think about feature to add a history of upgrades if they were any.

Describe alternatives you've considered
None.

Additional context
None.


DoD checklist

  • Changelog updated
  • COMPONENTS.md updated / doesn't need to be updated
  • Schema updated / doesn't need to be updated
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
  • Idempotency tested
  • Documentation added / updated / doesn't need to be updated
  • All conversations in PR resolved
  • Solution meets requirements and is done according to design doc
  • Usage compliant with license
  • Backport tasks created / doesn't need to be backported
@mkyc
Copy link
Contributor

mkyc commented May 29, 2020

@rafzei do you mean that:

*****EPICLI VERSION******
0.6.0

?
Those lines are currently at the top of generated dump.

@rafzei
Copy link
Contributor Author

rafzei commented May 29, 2020

@mkyc I mean 'target' VMs not a epicli one. I've edit the issue description - I hope it has more sense right now.

@to-bar to-bar changed the title Add version number of epicli to the logs. Allow to check on VMs which epicli version was used to deploy/upgrade components Jan 28, 2021
@to-bar to-bar added status/grooming-needed priority/high Task with high priority labels Jan 28, 2021
@to-bar
Copy link
Contributor

to-bar commented Jan 28, 2021

Today I was asked about such functionality so it's really needed.

@atsikham
Copy link
Contributor

atsikham commented Mar 5, 2021

Optional, but with that feature we can skip following step in data/common/ansible/playbooks/roles/image_registry/tasks/load-image.yml if there is an upgrade to the same version:

- name: Load legacy version images to registry when upgrading
   include_tasks: load-image.yml
   vars:
     docker_image: "{{ item }}"
   loop: "{{ specification.images_to_load.legacy }}"
   when: is_upgrade_run

@erzetpe erzetpe added python Pull requests that update Python code type/low-hanging-fruit Good, nice, simple task status/grooming-needed labels Sep 6, 2021
@erzetpe erzetpe changed the title Allow to check on VMs which epicli version was used to deploy/upgrade components [FEATURE REQUEST] Allow to check on VMs which epicli version was used to deploy/upgrade components Sep 6, 2021
@sbbroot sbbroot self-assigned this Sep 27, 2021
@mkyc
Copy link
Contributor

mkyc commented Sep 27, 2021

Such information is presented in MOTD now (see #2628)

@atsikham
Copy link
Contributor

Such information is presented in MOTD now (see #2628)

Right, but only during login and there is no any upgrade history that @rafzei mentioned in description.

@rafzei
Copy link
Contributor Author

rafzei commented Sep 27, 2021

Yup, I think adding some ~/.version or ~/.epicli file containing that information would be a good solution here.

.epicli:

# type - date - version
Apply - 11:30:00 27-09-2021 - 1.3.0dev

@mkyc
Copy link
Contributor

mkyc commented Sep 27, 2021

Or /etc/epiphany/version. But yes, log would be much better.

sbbroot added a commit to sbbroot/epiphany that referenced this issue Oct 1, 2021
* Add version info file creation for each VM used.
sbbroot added a commit to sbbroot/epiphany that referenced this issue Oct 1, 2021
* Add version info file creation for each VM used.
sbbroot added a commit to sbbroot/epiphany that referenced this issue Oct 15, 2021
* Add version info file creation for each VM used.
sbbroot added a commit to sbbroot/epiphany that referenced this issue Nov 5, 2021
* Add version info file creation for each VM used.
@przemyslavic przemyslavic self-assigned this Nov 15, 2021
@przemyslavic
Copy link
Collaborator

✔️ When executing apply and upgrade commands, the appropriate entries with execution status are added to the /var/lib/epiphany/history.yml file:

[ec2-user@ec2-1-1-1-1 ~]$ cat /var/lib/epiphany/history.yml
deployments:
- date: '2021-11-15 11:49:24'
  mode: apply
  status: completed
  version: 1.3.0dev
- date: '2021-11-15 11:29:22'
  mode: upgrade
  status: completed
  version: 1.3.0dev
- date: '2021-11-15 11:28:36'
  mode: upgrade
  status: failed
  version: 1.3.0dev
- date: '2021-11-15 11:11:42'
  mode: apply
  status: completed
  version: 1.3.0dev
- date: '2021-11-15 10:29:18'
  mode: apply
  status: completed
  version: 1.3.0dev

Now #2715 should be done as related task.

sbbroot added a commit that referenced this issue Nov 15, 2021
* Add epicli versioning (#1306)

Co-authored-by: to-bar <[email protected]>
@mkyc mkyc closed this as completed Nov 16, 2021
atsikham added a commit to atsikham/epiphany that referenced this issue Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high Task with high priority python Pull requests that update Python code type/improvement type/low-hanging-fruit Good, nice, simple task
Projects
None yet
Development

No branches or pull requests

7 participants