caktus / caktus/invoke-kubesae
inv staging deploy
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to get `inv staging deploy` to be the only command that a dev needs to memorize to do a deploy (similar to how we used to just do `fab staging deploy`.
Currently `inv staging deploy` does this:
```
$ inv staging deploy
cd deploy/ && ansible-galaxy install -f -r 'requirements.yaml' -p roles/
- changing role caktus.django-k8s from v0.0.5 to v0.0.5
- extracting caktus.django-k8s to /home/vkurup/dev/caktus-website/deploy/roles/caktus.django-k8s
- caktus.django-k8s (v0.0.5) was installed successfully
Traceback (most recent call last):
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/config.py", line 111, in __getattr__
return self._get(key)
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/config.py", line 176, in _get
value = self._config[key]
KeyError: 'tag'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/bin/inv", line 8, in
sys.exit(program.run())
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/program.py", line 384, in run
self.execute()
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/program.py", line 566, in execute
executor.execute(*self.tasks)
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/executor.py", line 129, in execute
result = call.task(*args, **call.kwargs)
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/tasks.py", line 127, in __call__
result = self.body(*args, **kwargs)
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/kubesae/ansible/deploy.py", line 30, in ansible_deploy
tag = c.config.tag
File "/home/vkurup/.pyenv/versions/3.7.6/envs/caktus-website/lib/python3.7/site-packages/invoke/config.py", line 123, in __getattr__
raise AttributeError(err)
AttributeError: No attribute or config key found for 'tag'
```
Theoretically at least, we could catch that error in `ansible/deploy.py` line 30, and run the `image` task. Thoughts?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `inv staging deploy` and inspect `ansible/deploy.py` at line 30, where the missing `tag` configuration causes the failure. Check how the `image` task is invoked, then make the staging command complete deployment without requiring a separate command or failing on the missing tag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes, python
- Domain
- cli, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100