Skip to content

Commit 5d4e653

Browse files
authored
Prepare Flintrock 2.1.0 release (#369)
- Tweak the license file so GitHub recognizes it. - Fix a mistake in the manifest file so the change log is included as intended. - Update the default Amazon Linux 2 AMI. - Update and trim the main README a bit. - Adopt pyproject.toml. It is "strongly recommended" and commands like python setup.py sdist bdist_wheel are deprecated in favor of python -m build. - Trim outdated comments and pin of cryptography from setup.py. - Update testing code for setting up private VPC.
1 parent d45a2c8 commit 5d4e653

File tree

19 files changed

+92
-91
lines changed

19 files changed

+92
-91
lines changed

.github/workflows/flintrock.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
- ubuntu-20.04
1818
- macos-11
1919
python-version:
20+
# Update the artifact upload steps below if modifying
21+
# this list of Python versions.
2022
- "3.8"
2123
- "3.9"
2224
- "3.10"
@@ -32,14 +34,16 @@ jobs:
3234
architecture: x64
3335
- run: "pip install -r requirements/maintainer.pip"
3436
- run: "pytest"
35-
- run: python setup.py sdist bdist_wheel
37+
- run: python -m build
3638
- uses: actions/upload-artifact@v3
37-
if: ${{ matrix.python-version == '3.9' }}
39+
# Use the latest supported Python to build a standalone package.
40+
if: ${{ matrix.python-version == '3.12' }}
3841
with:
3942
name: Flintrock Standalone - ${{ matrix.os }}
4043
path: dist/Flintrock-*-standalone-*.zip
4144
- uses: actions/upload-artifact@v3
42-
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.9' }}
45+
# Use the oldest supported Python to build a wheel.
46+
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8' }}
4347
with:
4448
name: Flintrock Wheel
4549
path: dist/Flintrock-*.whl

CHANGES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@
22

33
## [Unreleased]
44

5-
[Unreleased]: https://github.com/nchammas/flintrock/compare/v2.0.0...master
5+
[Unreleased]: https://github.com/nchammas/flintrock/compare/v2.1.0...master
6+
7+
Nothing notable yet.
8+
9+
## [2.1.0] - 2023-11-26
10+
11+
[2.1.0]: https://github.com/nchammas/flintrock/compare/v2.0.0...2.1.0
612

713
### Changed
814

915
* [#348], [#367]: Bumped default Spark to 3.5.0 and default Hadoop to 3.3.6; dropped support for Python 3.6 and 3.7; added CI builds for Python 3.10, 3.11, and 3.12.
1016
* [#361]: Migrated from AdoptOpenJDK, which is deprecated, to Adoptium OpenJDK.
1117
* [#362], [#366]: Improved Flintrock's ability to cleanup after launch failures.
1218
* [#366]: Deprecated `--ec2-spot-request-duration`, which is not needed for one-time spot instances launched using the RunInstances API.
19+
* [#369]: Adopted `pyproject.toml` and tweaked Flintrock's Python packaging accordingly. This keeps Flintrock in line with modern Python packaging standards and should be transparent to end-users.
1320

1421
[#348]: https://github.com/nchammas/flintrock/pull/348
1522
[#361]: https://github.com/nchammas/flintrock/pull/361
1623
[#362]: https://github.com/nchammas/flintrock/pull/362
1724
[#366]: https://github.com/nchammas/flintrock/pull/366
1825
[#367]: https://github.com/nchammas/flintrock/pull/367
26+
[#369]: https://github.com/nchammas/flintrock/pull/369
1927

2028
## [2.0.0] - 2021-06-10
2129

LICENSE

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/
@@ -179,15 +178,15 @@
179178
APPENDIX: How to apply the Apache License to your work.
180179

181180
To apply the Apache License to your work, attach the following
182-
boilerplate notice, with the fields enclosed by brackets "{}"
181+
boilerplate notice, with the fields enclosed by brackets "[]"
183182
replaced with your own identifying information. (Don't include
184183
the brackets!) The text should be enclosed in the appropriate
185184
comment syntax for the file format. We also recommend that a
186185
file or class name and description of purpose be included on the
187186
same "printed page" as the copyright notice for easier
188187
identification within third-party archives.
189188

190-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2024 Nicholas Chammas
191190

192191
Licensed under the Apache License, Version 2.0 (the "License");
193192
you may not use this file except in compliance with the License.
@@ -199,4 +198,4 @@
199198
distributed under the License is distributed on an "AS IS" BASIS,
200199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201200
See the License for the specific language governing permissions and
202-
limitations under the License.
201+
limitations under the License.

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# See: https://docs.python.org/3/distutils/commandref.html
1+
# See: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
22
graft flintrock
33

44
include README.md
5-
include CHANGELOG.md
5+
include CHANGES.md
66
include COPYRIGHT
77
include LICENSE
88

README.md

Lines changed: 25 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ flintrock launch test-cluster \
3333
--spark-version 3.5.0 \
3434
--ec2-key-name key_name \
3535
--ec2-identity-file /path/to/key.pem \
36-
--ec2-ami ami-0aeeebd8d2ab47354 \
36+
--ec2-ami ami-0588935a949f9ff17 \
3737
--ec2-user ec2-user
3838
```
3939

@@ -123,10 +123,17 @@ without too much trouble, too.
123123

124124
### Release version
125125

126-
To get the latest release of Flintrock, simply run [pip](https://pip.pypa.io/en/stable/):
126+
To get the latest release of Flintrock, simply install it with [pip][pip].
127+
128+
Since Flintrock is a command-line application rather than a library, you may prefer to
129+
install it using [pipx][pipx], which automatically takes care of installing Flintrock to
130+
an isolated virtual environment for you.
131+
132+
[pip]: https://pip.pypa.io/en/stable/
133+
[pipx]: https://pypa.github.io/pipx/
127134

128135
```
129-
pip3 install flintrock
136+
pipx install flintrock
130137
```
131138

132139
This will install Flintrock and place it on your path. You should be good to go now!
@@ -140,27 +147,14 @@ flintrock configure
140147

141148
### Standalone version (Python not required!)
142149

143-
If you don't have a recent enough version of Python, or if you don't have Python installed at all,
144-
you can still use Flintrock. We publish standalone packages of Flintrock on GitHub with our
145-
[releases](https://github.com/nchammas/flintrock/releases).
146-
147-
Find the standalone package for your OS under our [latest release](https://github.com/nchammas/flintrock/releases/latest),
148-
unzip it to a location of your choice, and run the `flintrock` executable inside.
149-
150-
For example:
151-
152-
```sh
153-
flintrock_version="2.0.0"
154-
155-
curl --location --remote-name "https://github.com/nchammas/flintrock/releases/download/v$flintrock_version/Flintrock-$flintrock_version-standalone-macOS-x86_64.zip"
156-
unzip -q -d flintrock "Flintrock-$flintrock_version-standalone-macOS-x86_64.zip"
157-
cd flintrock/
150+
We used to publish standalone versions of Flintrock that don't require you to have Python
151+
installed on your machine. Since Flintrock 2.1.0, we have stopped publishing these
152+
standalone builds.
158153

159-
# You're good to go!
160-
./flintrock --help
161-
```
154+
If you used these standalone packages, please [chime in on this issue][standalone] and
155+
share a bit about your environment and use case.
162156

163-
You'll probably want to add the location of the Flintrock executable to your `PATH` so that you can invoke it from any directory.
157+
[standalone]: https://github.com/nchammas/flintrock/issues/370
164158

165159
### Community-supported distributions
166160

@@ -175,7 +169,7 @@ These packages are not supported by the core contributors and **may be out of da
175169
If you like living on the edge, install the development version of Flintrock:
176170

177171
```sh
178-
pip3 install git+https://github.com/nchammas/flintrock
172+
pipx install git+https://github.com/nchammas/flintrock
179173
```
180174

181175
If you want to [contribute](https://github.com/nchammas/flintrock/blob/master/CONTRIBUTING.md), follow the instructions in our contributing guide on [how to install Flintrock](https://github.com/nchammas/flintrock/blob/master/CONTRIBUTING.md#contributing-code).
@@ -203,17 +197,17 @@ There are some things that Flintrock specifically *does not* support.
203197

204198
Flintrock is not for managing long-lived clusters, or any infrastructure that serves as a permanent part of some environment.
205199

206-
For starters, Flintrock provides no guarantee that clusters launched with one version of Flintrock can be managed by another version of Flintrock, and no considerations are made for any long-term use cases.
200+
For starters, Flintrock provides no guarantee that clusters launched with one version of Flintrock can be managed by another version of Flintrock, and no considerations are made for any long-term use cases.
207201

208-
If you are looking for ways to manage permanent infrastructure, look at tools like [Terraform](https://www.terraform.io/), [Ansible](http://www.ansible.com/), [SaltStack](http://saltstack.com/), or [Ubuntu Juju](http://www.ubuntu.com/cloud/tools/juju). You might also find a service like [Databricks](https://databricks.com/product/databricks) useful if you're looking for someone else to host and manage Spark for you. Amazon also offers [Spark on EMR](https://aws.amazon.com/elasticmapreduce/details/spark/).
202+
If you are looking for ways to manage permanent infrastructure, look at tools like [Terraform](https://www.terraform.io/), [Ansible](http://www.ansible.com/), or [Ubuntu Juju](http://www.ubuntu.com/cloud/tools/juju). You might also find a service like [Databricks](https://databricks.com/product/databricks) useful if you're looking for someone else to host and manage Spark for you. Amazon also offers [Spark on EMR](https://aws.amazon.com/elasticmapreduce/details/spark/).
209203

210204
### Launching non-Spark-related services
211205

212-
Flintrock is meant for launching Spark clusters that include closely related services like HDFS, Mesos, and YARN.
206+
Flintrock is meant for launching Spark clusters that include closely related services like HDFS.
213207

214-
Flintrock is not for launching external datasources (e.g. Cassandra), or other services that are not closely integrated with Spark (e.g. Tez).
208+
Flintrock is not for launching external datasources (e.g. Cassandra), or other services that are not closely integrated with Spark (e.g. Tez).
215209

216-
If you are looking for an easy way to launch other services from the Hadoop ecosystem, look at the [Apache Bigtop](http://bigtop.apache.org/) project.
210+
If you are looking for an easy way to launch other services from the Hadoop ecosystem, look at the [Apache Bigtop](http://bigtop.apache.org/) project.
217211

218212
### Launching out-of-date services
219213

@@ -263,7 +257,7 @@ providers:
263257
identity-file: /path/to/.ssh/key.pem
264258
instance-type: m5.large
265259
region: us-east-1
266-
ami: ami-0aeeebd8d2ab47354
260+
ami: ami-0588935a949f9ff17
267261
user: ec2-user
268262
```
269263
@@ -283,29 +277,7 @@ flintrock launch test-cluster \
283277

284278
### Fast Launches
285279

286-
Flintrock is really fast. This is how quickly it can launch fully operational clusters on EC2 compared to [spark-ec2](https://github.com/amplab/spark-ec2).
287-
288-
#### Setup
289-
290-
* Provider: EC2
291-
* Instance type: `m3.large`
292-
* AMI:
293-
* Flintrock: [Default Amazon Linux AMI](https://aws.amazon.com/amazon-linux-ami/)
294-
* spark-ec2: [Custom spark-ec2 AMI](https://github.com/amplab/spark-ec2/tree/a990752575cd8b0ab25731d7820a55c714798ec3/ami-list)
295-
* Spark/Hadoop download source: S3
296-
* Launch time: Best of 6 tries
297-
298-
#### Results
299-
300-
| Cluster Size | Flintrock Launch Time | spark-ec2 Launch Time |
301-
|---------------|----------------------:|------------------------:|
302-
| 1 slave | 2m 06s | 8m 44s |
303-
| 50 slaves | 2m 30s | 37m 30s |
304-
| 100 slaves | 2m 42s | 1h 06m 05s |
305-
306-
The spark-ec2 launch times are sourced from [SPARK-5189](https://issues.apache.org/jira/browse/SPARK-5189).
307-
308-
Note that AWS performance is highly variable, so you will not get these results consistently. They show the best case scenario for each tool, and not the typical case. For Flintrock, the typical launch time will be a minute or two longer.
280+
Flintrock is really fast. It can launch a 100-node cluster in about three minutes (give or take a few seconds due to AWS's normal performance variability).
309281

310282
### Advanced Storage Setup
311283

@@ -330,7 +302,7 @@ Flintrock is built and tested against vanilla Amazon Linux and CentOS. You can e
330302

331303
Supporting multiple versions of anything is tough. There's more surface area to cover for testing, and over the long term the maintenance burden of supporting something non-current with bug fixes and workarounds really adds up.
332304

333-
There are projects that support stuff across a wide cut of language or API versions. For example, Spark supports Java 7 and 8, and Python 2.6+ and 3+. The people behind these projects are gods. They take on an immense maintenance burden for the benefit and convenience of their users.
305+
There are projects that support stuff across a wide cut of language or API versions. For example, Spark supports multiple versions of Java, Scala, R, and Python. The people behind these projects are gods. They take on an immense maintenance burden for the benefit and convenience of their users.
334306

335307
We here at project Flintrock are much more modest in our abilities. We are best able to serve the project over the long term when we limit ourselves to supporting a small but widely applicable set of configurations.
336308

flintrock/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# See: https://packaging.python.org/en/latest/distributing/#standards-compliance-for-interoperability
2-
__version__ = '2.1.0.dev0'
1+
__version__ = '2.1.0'

flintrock/config.yaml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ providers:
3030
instance-type: m5.large
3131
region: us-east-1
3232
# availability-zone: <name>
33-
ami: ami-0cabc39acf991f4f1 # Amazon Linux 2, us-east-1
33+
ami: ami-0588935a949f9ff17 # Amazon Linux 2, us-east-1
3434
user: ec2-user
3535
# ami: ami-61bbf104 # CentOS 7, us-east-1
3636
# user: centos

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Minimal pyproject file per: https://packaging.python.org/en/latest/guides/modernize-setup-py-project/
2+
[build-system]
3+
# Minimum setuptools version that supports version in setup.cfg per: https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
4+
requires = ["setuptools >= 46.4.0"]
5+
build-backend = "setuptools.build_meta"

requirements/developer.pip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ coverage[toml]==7.3.2
3636
cryptography==41.0.5
3737
# via
3838
# -r requirements/user.pip
39-
# flintrock
4039
# paramiko
4140
exceptiongroup==1.2.0
4241
# via pytest

requirements/maintainer.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
wheel >= 0.31.0
33
twine == 4.0.2
44
PyInstaller == 6.2.0
5+
build >= 1.0.3, < 2.0.0

0 commit comments

Comments
 (0)