aws / aws/aws-codedeploy-agent
Add the CodeDeploy agent to the PATH
- 主要言語
- Rust
- スター
- 337
- フォーク
- 195
- 平均マージ
- 10時間 54分
- マージ済み PR(30日)
- 4
説明
> The title only describes one problem. In this issue, I'm reporting several issues.
I've used the instructions [here](https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html) to install the CodeDeploy agent.
(I know this is not the recommended way, but using the AWS System Manager seems more complicated. It's not just one click. You need to associate your EC2 with the AWS System Manager and do other stuff. To me, this looks already too complicated, so I don't even know why this is the recommended way.)
On Ubuntu, it seems that the agent is installed in `/opt/codedeploy-agent/bin/codedeploy-agent`. However, if we do `codedeploy-agent --version` we get a `codedeploy-agent: command not found`, which means we can't directly interact with the agent by just specifying the name, but we need to specify the full path, which is tedious.
Is there any reason why we wouldn't want to add the agent to the PATH? I think the only possible reason not to do this is that, if we decide to remove the agent, we may want to update the PATH. But can't this be done consistently?
The other problem is that `/opt/codedeploy-agent/bin/codedeploy-agent --version` does not return anything because there's no `--version` option, which is so weird. It seems that there are only the options to start, stop, etc., the agent/service. I think there could be other options, like ways to flush the logs, clean up old deployments, self-update the agent and also to remove the agent. Btw, why isn't there already a way to install the agent with `apt` or `apt-get`?
Another problem with CodeDeploy is that there's no way (apparently) to ignore errors in hooks in the `appspec.yml`. I really don't understand why this option doesn't at least exist for the `ApplicationStop` hook, which always fails the first time you're setting a new project. It's so tedious to always have to manual deploy until you get it right. I basically had to do this like 30 times so far because `ApplicationStop` sometimes fails because of what I've just said.
I've just started to use AWS CodeDeploy, but honestly I was expecting it to be more advanced and simpler to use. It looks unnecessary complicated mostly because it lacks many useful features (e.g. I should just need to do `sudo apt install codedeploy-agent` to install it, and after that I should be able to do `codedeploy-agent --version`).
コントリビューションガイド
調査の方向性
Ubuntu のインストール手順と /opt/codedeploy-agent/bin/codedeploy-agent にあるエージェントのエントリーポイントから始め、PATH、--version、パッケージのインストール、AppSpec のフックエラーに関する要求を個別のスコープに分けます。既存のサービスコマンドと appspec.yml の動作を確認します。done は選択した 1 つの機能について個別に定義し、その動作と検証方法を実装前に合意しておく必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, ubuntu
- 領域
- cloud, devops
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 15/100