You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository hosts scripts to generate self-contained installations of the [EB CLI](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html).
10
6
11
-
------
7
+
### 1.1. Prerequisites
12
8
9
+
You will need to have the following prerequisites installed before running the install script.
13
10
14
-
### 1.1. Prerequisites
11
+
***Git**
12
+
* If not already installed you can download git from the [Git downloads page](https://git-scm.com/downloads).
13
+
***Python**
14
+
* We recommend that you install Python using the [pyenv](https://github.com/pyenv/pyenv) Python version manager. Alternately, you can download Python from the [Python downloads page](https://www.python.org/downloads/).
15
+
***virtualenv**
16
+
* Follow the [virtualenv documentation](https://virtualenv.pypa.io/en/latest/installation.html) to install virtualenv.
15
17
16
-
If you don't have Git, install it from [Git Downloads](https://git-scm.com/downloads).
18
+
## 2. Quick start
17
19
18
-
Python, which the EBCLI Installer depends on, requires the following prerequisites for each operating system.
On Linux and macOS, the output contains instructions to add the EB CLI (and Python) executable file to the shell's `$PATH` variable, if it isn't already in it.
42
47
43
-
------
48
+
## 3. Usage
44
49
45
-
#### 2.1. Clone this repository
50
+
The `ebcli_installer.py` Python script will install the [awsebcli](https://pypi.org/project/awsebcli/) package in a virtual environment to prevent potential conflicts with other Python packages.
46
51
47
-
Use the following:
52
+
For most use cases you can execute the `ebcli_installer.py` script with no arguments.
On Linux and macOS, the output contains instructions to add the EB CLI (and Python) executable file to the shell's `$PATH` variable, if it isn't already in it.
117
-
118
-
#### 2.5. Demo execution of `bundled_installer`
119
-
120
-

121
-
122
-
### 3. Advanced use
123
-
124
-
To install the EB CLI, `bundled_installer` runs `ebcli_installer.py`. `ebcli_installer.py` has the following capabilities:
125
-
126
-
- To install a **specific version** of the EB CLI:
Run the following command to view the help text for`ebcli_installer.py`:
151
-
152
-
```shell
153
-
python scripts/ebcli_installer.py --help
154
-
```
153
+
### 5.1. For the **experienced Python developer**, what's the advantage of this mode of installation instead of regular `pip` inside a `virtualenv`?
155
154
156
-
### 4. Frequently asked questions
155
+
Even within a `virtualenv`, a developer might need to install multiple packages whose dependencies are in conflict. For example, at times the AWS CLI and the EB CLI have used conflicting versions of `botocore`. [One such instance](https://github.com/aws/aws-cli/issues/3550) was particularly egregious. When there are conflicts, users have to manage separate `virtualenvs`for each of the conflicting packages, or find a combination of the packages without conflicts.
157
156
158
-
------
157
+
Both of these workarounds become unmanageable over time, and as the number of packages that are in conflict increases.
159
158
160
-
#### 4.1. Can I skip the Python installation?
161
-
162
-
**Yes.** If you already have Python installed on your system, after step `2.1.`, run the following.
#### 4.2. For the **experienced Python developer**, what's the advantage of this mode of installation instead of regular `pip` inside a `virtualenv`?
177
-
178
-
Even within a `virtualenv`, a developer might need to install multiple packages whose dependencies are in conflict. For example, at times the AWS CLI and the EB
179
-
CLI have used conflicting versions of `botocore`. [One such instance](https://github.com/aws/aws-cli/issues/3550) was particularly egregious. When there are
180
-
conflicts, users have to manage separate `virtualenvs`for each of the conflicting packages, or find a combination of the packages without conflicts.
181
-
Both these workarounds become unmanageable over time, and as the number of packages that are in conflict increases.
182
-
183
-
#### 4.3. On macOS (or Linux systems with `brew`), is this better than `brew install awsebcli`?
159
+
### 5.2. On macOS (or Linux systems with `brew`), is this better than `brew install awsebcli`?
184
160
185
161
**Yes**, for these reasons:
186
162
187
163
- The AWS Elastic Beanstalk team has no control over how `brew` operates.
188
164
- The `brew install ...` mechanism doesn't solve the problem of dependency conflicts, which is a primary goal of this project.
189
165
190
-
#### 4.3. For developers who are **new to Python**, does this mode of installation pose challenges?
191
-
192
-
The opinion of the AWS Elastic Beanstalk team is "**No**".
193
-
194
-
Aside from the problem described in `4.2.`, developers new to Python are often confused by the presence of multiple versions of Python and `pip` executable files on
195
-
their system. A common problem that such developers encounter is that when they install `eb` with one `pip` executable file (presumably using the `sudo`
196
-
prefix),
197
-
no `eb`-related commands work because the correct set of directories isn't referenced correctly.
198
-
199
-
Typically, for such developers, use of `virtualenv` is the correct path forward. However, this becomes yet another hurdle before using `eb`.
200
-
201
-
Another common problem is where users install Python and `pip`in ways that Elastic Beanstalk Documentation doesn't recommend, such as using arbitrary Personal Package Archives
202
-
(PPAs) on Ubuntu, or similar unmaintained sources that lack scrutiny.
203
-
204
-
#### 4.4. Can I execute the Bash scripts in a Cygwin, git-bash, or other Bash-like shell on Windows?
205
-
206
-
**No**. At this time, we don't directly support execution on Bash-like environments on Windows. Use PowerShell or the Command Prompt window to install. You can
207
-
add the location of the `eb` and `Python` executable files to `$PATH`.
208
-
209
-
#### 4.5. Can I execute the Bash scripts in a `fish` shell?
210
-
**Yes**, but only if you have Bash on your computer. At this time we don't provide specific guidance on how to set `$PATH` in Fish, however, Fish has [detailed documentation](https://fishshell.com/docs/current/tutorial.html#tut_path) for this purpose.
211
-
212
-
#### 4.6. I already have Python installed. Can I still execute `bundled_installer`?
213
-
214
-
**Yes**. It's safe to execute `bundled_installer` even if you already have Python installed. The installer will skip reinstallation.
215
-
216
-
#### 4.7. I already have the EB CLI installed. Can I still execute `ebcli_installer.py`?
166
+
### 5.3. I already have the EB CLI installed. Can I still execute `ebcli_installer.py`?
217
167
218
168
**Yes**.
219
169
220
170
Consider the following two cases:
221
171
222
-
- `ebcli_installer.py` was previously run, creating `.ebcli-virtual-env`in the user's home directory (or the user's choice of a directory indicated through the
223
-
`--location` argument). In this case, the EB CLI will overwrite `.ebcli-virtual-env` and attempt to install the latest version of the EB CLI in the `virtualenv` within it.
172
+
- `ebcli_installer.py` was previously run, creating `.ebcli-virtual-env` in the user's home directory (or the user's choice of a directory indicated through the `--location` argument). In this case, the EB CLI will overwrite `.ebcli-virtual-env` and attempt to install the latest version of the EB CLI in the `virtualenv` within it.
224
173
225
174
- `eb` is in `$PATH`, however, it wasn't installed by `ebcli_installer.py`. In this case, the installer will install `eb` within `.ebcli-virtual-env`in the
226
175
user's home directory (or the user's choice of a directory indicated through the `--location` argument), and prompt the user to prefix
227
176
`/path-to/.ebcli-virtual-env/executables` to `$PATH`. Until you perform this action, the older `eb` executable file will continue to be referenced when you type`eb`.
228
177
229
-
#### 4.8. How does `ebcli_installer.py` work?
178
+
### 5.4. How does `ebcli_installer.py` work?
230
179
231
180
When executing the Python script, `ebcli_installer.py` does the following:
232
181
@@ -237,24 +186,12 @@ When executing the Python script, `ebcli_installer.py` does the following:
237
186
- `.bat` and `.ps1` wrappers for`eb` on Windows.
238
187
- When complete, you will be prompted to add `<installation-location>/executables` to `$PATH`, only if the directory is not already in it.
239
188
240
-
#### 4.8. How does `bundled_installer` work?
241
-
242
-
- On macOS or Linux, `bundled_installer` uses the extremely popular [`pyenv` project](https://github.com/pyenv/pyenv) to install the latest version of Python 3.7.
243
-
- On Windows, it downloads the MSI installer of the latest Python version from Python's website and silently installs it.
244
-
245
-
#### 4.9. Are there dependency problems that this mode of installation doesn't solve?
189
+
### 5.5. Are there dependency problems that this mode of installation doesn't solve?
246
190
247
191
Unfortunately, **yes**.
248
192
249
193
Suppose the dependencies of `eb`, say `Dep A` and `Dep B`, are in conflict. Because `pip` lacks dependency management capabilities, the resulting `eb` installation might not work.
250
194
251
-
#### 4.10. Is it okay to use Python 2.7 to install the EB CLI?
252
-
253
-
**Yes**, however, be aware that Python 2.7 will be deprecated on January 1, 2020. There won't be security updates after that date.
254
-
255
-
Also, the latest minor version series, Python 3.7, offers significant improvements over the Python 2.7 series. We highly recommend that you use Python 3.7
256
-
for testing purposes, even though the Elastic Beanstalk team tests the EB CLI against Python 2.7.
257
-
258
-
### 5. License
195
+
## 6. License
259
196
260
197
This library is licensed under the Mozilla Public License Version 2.0.
0 commit comments