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

Rename occurrences of Skylark to Skyplane #305

Merged
merged 5 commits into from
May 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
pip install -e ".[gateway,solver]"
pip install pytype
- name: Run pytype
run: pytype skylark --config .pytype.cfg -j auto
run: pytype skyplane --config .pytype.cfg -j auto
# pylint:
# runs-on: ubuntu-latest
# steps:
Expand All @@ -41,4 +41,4 @@ jobs:
# pip install -e .
# pip install pylint
# - name: Run pylint
# run: (find skylark -type f -name "*.py" | xargs pylint --rcfile=.pylintrc) || true
# run: (find skyplane -type f -name "*.py" | xargs pylint --rcfile=.pylintrc) || true
8 changes: 4 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
pip install -U pytest

- name: Run unit tests
run: pytest skylark/test/unit_nocloud
run: pytest skyplane/test/unit_nocloud
#- name: Run cloud tests
###consider only running cloud tests for PRs to main once we go open source
###if: ${{ github.event_name == 'pull_request' && github.base_ref == github.event.repository.default_branch }}
#run: |
#pytest skylark/test/unit_aws
#pytest skylark/test/unit_azure
#pytest skylark/test/unit_gcp
#pytest skyplane/test/unit_aws
#pytest skyplane/test/unit_azure
#pytest skyplane/test/unit_gcp
2 changes: 1 addition & 1 deletion .pytype.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude =
**/*_test.py
**/test_*.py
**/__init__.py
skylark/benchmark/**/*.py
skyplane/benchmark/**/*.py

# Space-separated list of files or directories to process.
inputs =
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Welcome to Skylark's contributing guide
# Welcome to Skyplane's contributing guide

Thank you for investing your time in contributing to our project! Your contributions will have an impact forever on our project.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

## TLDR
1. Use PRs to merge code into the Skylark repository. Add another project collaborator as a reviewer (or a maintainer will assign one).
1. Use PRs to merge code into the Skyplane repository. Add another project collaborator as a reviewer (or a maintainer will assign one).
2. Make sure to format your code using [Black](https://github.com/psf/black). Run `black -l 140 .` before merging your PR.
3. Check for major syntax errors or type signature bugs using [PyType](https://github.com/google/pytype). Run `pytype --config .pytype.cfg skylark` before merging your PR.
3. Check for major syntax errors or type signature bugs using [PyType](https://github.com/google/pytype). Run `pytype --config .pytype.cfg skyplane` before merging your PR.

## New contributor guide

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ WORKDIR /pkg
COPY . .
RUN pip3 install --no-dependencies -e ".[gateway]"

CMD ["python3", "skylark/gateway/gateway_daemon.py"]
CMD ["python3", "skyplane/gateway/gateway_daemon.py"]
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ This package represents both components as a single binary. Docker builds a sing

### Building and deploying the gateway

First, clone and enter the skylark directory:
First, clone and enter the skyplane directory:
```
$ git clone https://github.com/parasj/skylark
$ cd skylark
$ git clone https://github.com/skyplane-project/skyplane
$ cd skyplane
```

Then, configure cloud credentials as needed:
Expand All @@ -43,7 +43,7 @@ Then, configure cloud credentials as needed:
Finally, install and initalize Skyplane:
```
$ pip install -e ".[all]"
$ skylark init
$ skyplane init
```

To run a sample transfer, first build a new version of the GatewayDaemon Docker image and push it to ghcr.io (ensure you are authenticated as above):
Expand Down Expand Up @@ -77,24 +77,24 @@ tltkismwtov5n8zokghil1py9
u0e2ymhmv64oriiq66ibepn63

Total reclaimed space: 0B
SKYLARK_DOCKER_IMAGE=ghcr.io/skyplane-project/skyplane:local-PotRzrFT
SKYPLANE_DOCKER_IMAGE=ghcr.io/skyplane-project/skyplane:local-PotRzrFT
```

</details>

The script will export the new image (ghcr.io/skyplane-project/skyplane:local-PotRzrFT in this example) to an environment variable (`SKYLARK_DOCKER_IMAGE`). Ensure you use `source` so the environment variable is published to your shell.
The script will export the new image (ghcr.io/skyplane-project/skyplane:local-PotRzrFT in this example) to an environment variable (`SKYPLANE_DOCKER_IMAGE`). Ensure you use `source` so the environment variable is published to your shell.

### Running a basic cloud to cloud transfer job
We then run the ReplicatorClient with that new Docker image (stored in `$SKYLARK_DOCKER_IMAGE`):
We then run the ReplicatorClient with that new Docker image (stored in `$SKYPLANE_DOCKER_IMAGE`):
```
$ skylark cp [s3/gs/azure]://[source-bucket-name]/[source-key-prefix] [s3/gs/azure]://[dest-bucket-name]/[dest-key-prefix]
$ skyplane cp [s3/gs/azure]://[source-bucket-name]/[source-key-prefix] [s3/gs/azure]://[dest-bucket-name]/[dest-key-prefix]
```
<details>
<summary>skylark cp result</summary>
<summary>skyplane cp result</summary>
<br>

```
$ skylark skylark cp s3://skylark-example-us-east-1/ s3://skylark-example-us-west-1/
$ skyplane cp s3://skyplane-example-us-east-1/ s3://skyplane-example-us-west-1/
11:34:48 [DEBUG] Cloud SSH key initialization: 3.23s
11:35:20 [DEBUG] Provisioning instances and waiting to boot: 31.87s
11:35:24 [DEBUG] Install docker: 2.79s
Expand All @@ -117,7 +117,7 @@ $ skylark skylark cp s3://skylark-example-us-east-1/ s3://skylark-example-us-wes
Replication: average 0.02Gbit/s: 100%|███████████████████████████████████████████████████████████████████████████████| 33.5M/33.5M [00:02<00:00, 17.0Mbit/s]
11:36:17 [INFO] Copying gateway logs from aws:us-east-1:i-08a9b4f70ee2caca3
11:36:17 [INFO] Copying gateway logs from aws:us-west-1:i-09dda9567bcf9ecad
11:36:21 [DEBUG] Wrote profile to /tmp/skylark/transfer_2022-03-29T11:36:17.755039/traceevent_5cb6dfbf-fac6-4ce6-a61b-1b813e83723d.json, visualize using `about://tracing` in Chrome
11:36:21 [DEBUG] Wrote profile to /tmp/skyplane/transfer_2022-03-29T11:36:17.755039/traceevent_5cb6dfbf-fac6-4ce6-a61b-1b813e83723d.json, visualize using `about://tracing` in Chrome
11:36:22 [WARN] Deprovisioning 2 instances
11:36:23 [WARN] Deprovisioned aws:us-west-1:i-09dda9567bcf9ecad
11:36:24 [WARN] Deprovisioned aws:us-east-1:i-08a9b4f70ee2caca3
Expand All @@ -132,11 +132,11 @@ When done, stop all instances started by Skyplane by running:
```skyklark deprovision```

<details>
<summary>skylark deprovision result</summary>
<summary>skyplane deprovision result</summary>
<br>

```
$ skylark deprovision
$ skyplane deprovision
No GCP project ID given, so will only deprovision AWS instances
Deprovisioning 3 instances
Deprovisioning (aws:ap-northeast-1): 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 2.33it/s]
Expand Down
24 changes: 12 additions & 12 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For other proposals or larger features, we ask that you open a new GitHub [Issue

## Setting up a developer environment

Skyplane is composed of the client (runs locally on a user's laptop) and gateway VMs (runs in respective clouds). Normally, the gateways use a pre-built nightly Docker image containing the latest build of the Skyplane gateway code (`ghcr.io/skyplane-project/skyplane:main`). However, if you modify the gateway source (under `skylark/gateway`), you will need to rebuild the gateway Docker image and push it to a container registry.
Skyplane is composed of the client (runs locally on a user's laptop) and gateway VMs (runs in respective clouds). Normally, the gateways use a pre-built nightly Docker image containing the latest build of the Skyplane gateway code (`ghcr.io/skyplane-project/skyplane:main`). However, if you modify the gateway source (under `skyplane/gateway`), you will need to rebuild the gateway Docker image and push it to a container registry.

**Ensure you have [authenticated your Github account with Docker](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)**:

Expand All @@ -32,27 +32,27 @@ $ echo <PERSONAL_ACCESS_TOKEN> | sudo docker login ghcr.io -u <GITHUB_USERNAME>
After making a change to the Skyplane source, we need to rebuild the gateway Docker image:

```bash
$ DOCKER_BUILDKIT=1 docker build -t skylark .
$ DOCKER_BUILDKIT=1 docker build -t skyplane .
```

We now need to push the Docker image to a container registry. Replace `ghcr.io/skyplane-project/skyplane` with your container registry if you are developing against a fork. We autogenerate a short random hash for the image tag.

```bash
$ export SKYLARK_DOCKER_IMAGE="ghcr.io/skyplane-project/skyplane:local-$(openssl rand -hex 16)"
$ sudo docker tag skylark $SKYLARK_DOCKER_IMAGE
$ sudo docker push $SKYLARK_DOCKER_IMAGE
$ export SKYPLANE_DOCKER_IMAGE="ghcr.io/skyplane-project/skyplane:local-$(openssl rand -hex 16)"
$ sudo docker tag skyplane $SKYPLANE_DOCKER_IMAGE
$ sudo docker push $SKYPLANE_DOCKER_IMAGE
```

To build the client, install the Skyplane package in development mode. The package points to your current checked-out version of the code, and any edits to the Skyplane client will immediately apply to the `skylark` CLI command.
To build the client, install the Skyplane package in development mode. The package points to your current checked-out version of the code, and any edits to the Skyplane client will immediately apply to the `skyplane` CLI command.
```bash
$ pip install -e .
```

We can run the `skylark` CLI to test a transfer. The CLI will read your `SKYLARK_DOCKER_IMAGE` environment variable and use that Docker image when launching gateways.
We can run the `skyplane` CLI to test a transfer. The CLI will read your `SKYPLANE_DOCKER_IMAGE` environment variable and use that Docker image when launching gateways.

```bash
$ skylark init
$ skylark cp s3://... s3://...
$ skyplane init
$ skyplane cp s3://... s3://...
```

## Submitting pull requests
Expand All @@ -62,15 +62,15 @@ Basic knowledge of git is assumed. To contribute to Skyplane:
1. Fork the Skyplane repository to create a copy of the project in your own account.
2. Set up a developer environment as described as above.
3. Create a development branch (`git checkout -b feature_name`)
4. Test your changes manually using `skylark cp` and with the unit test suite:
4. Test your changes manually using `skyplane cp` and with the unit test suite:
```bash
$ pytest -n auto skylark/test
$ pytest -n auto skyplane/test
```
5. Ensure your code is autoformatted and passes type checks:
```bash
$ pip install black pytype
$ black -l 140 .
$ pytype --config .pytype.cfg skylark
$ pytype --config .pytype.cfg skyplane
```
5. Commit your changes using a [descriptive commit message](https://cbea.ms/git-commit/).
6. Create a pull request on the main Skyplane repo from your fork. Consult [Github Help](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for more details.
18 changes: 9 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ Skyplane autodetects cloud credentials and valid regions from your CLI environme
.. code-block:: bash

---> Setup cloud provider connectors:
$ skylark init
$ skyplane init

We're ready to use Skyplane! Let's use `skylark cp` to copy files from AWS to GCP:
We're ready to use Skyplane! Let's use `skyplane cp` to copy files from AWS to GCP:

.. code-block:: bash

---> 🎸 Ready to rock and roll! Copy some files:
$ skylark cp s3://... gs://...
$ skyplane cp s3://... gs://...


What can you do with Skyplane?
Expand All @@ -53,22 +53,22 @@ Skyplane's cp command supports copying large datasets between cloud regions with

.. code-block:: bash

$ skylark cp s3://mybucket/big_dataset s3://mybucket2/
$ skyplane cp s3://mybucket/big_dataset s3://mybucket2/

Skyplane also supports copying between providers:

.. code-block:: bash

$ skylark cp s3://mybucket/big_dataset gs://mybucket2/
$ skyplane cp s3://mybucket/big_dataset gs://mybucket2/

For convenience, Skyplane also supports copying to and from your local filesystem:

.. code-block:: bash

$ skylark cp /path/to/dir s3://mybucket/big_dataset
$ skylark cp s3://mybucket/big_dataset /path/to/dir
$ skyplane cp /path/to/dir s3://mybucket/big_dataset
$ skyplane cp s3://mybucket/big_dataset /path/to/dir

For cloud-to-cloud transfers, once ``skylark`` provisions all gateway VMs, transfers can complete at up to 50Gb/s.
For cloud-to-cloud transfers, once ``skyplane`` provisions all gateway VMs, transfers can complete at up to 50Gb/s.

.. todo add gif of transfer bar here

Expand All @@ -87,4 +87,4 @@ Contents
:maxdepth: 2
:caption: API documentation

skylark_cli
skyplane_cli
4 changes: 2 additions & 2 deletions docs/skylark_cli.rst → docs/skyplane_cli.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CLI documentation
=================

.. automodule:: skylark.cli.cli
.. automodule:: skyplane.cli.cli
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:
8 changes: 4 additions & 4 deletions scripts/pack_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ NC='\033[0m' # No Color

echo -e "${BGreen}Building docker image${NC}"
set -e
sudo DOCKER_BUILDKIT=1 docker build -t skylark .
sudo DOCKER_BUILDKIT=1 docker build -t skyplane .
set +e

DOCKER_URL="ghcr.io/skyplane-project/skyplane:local-$(openssl rand -hex 16)"
echo -e "${BGreen}Uploading docker image to $DOCKER_URL${NC}"
set -e
sudo docker tag skylark $DOCKER_URL
sudo docker tag skyplane $DOCKER_URL
sudo docker push $DOCKER_URL
sudo docker system prune -f
set +e

export SKYLARK_DOCKER_IMAGE=$DOCKER_URL
echo -e "${BGreen}SKYLARK_DOCKER_IMAGE=$SKYLARK_DOCKER_IMAGE${NC}"
export SKYPLANE_DOCKER_IMAGE=$DOCKER_URL
echo -e "${BGreen}SKYPLANE_DOCKER_IMAGE=$SKYPLANE_DOCKER_IMAGE${NC}"
4 changes: 2 additions & 2 deletions scripts/plot_socket_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import matplotlib.pyplot as plt # type: ignore
from tqdm import tqdm

from skylark import skylark_root
from skyplane import skyplane_root


def plot(file):
Expand All @@ -28,7 +28,7 @@ def plot(file):
parser = argparse.ArgumentParser()
parser.add_argument("profile_file", help="Path to the profile file")
parser.add_argument(
"--plot_dir", default=skylark_root / "data" / "figures" / "socket_profiles", help="Path to the directory where to save the plot"
"--plot_dir", default=skyplane_root / "data" / "figures" / "socket_profiles", help="Path to the directory where to save the plot"
)
args = parser.parse_args()

Expand Down
4 changes: 0 additions & 4 deletions scripts/test_gateway.sh

This file was deleted.

9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


setup(
name="skylark",
name="skyplane",
version="0.1",
packages=["skylark"],
packages=["skyplane"],
python_requires=">=3.7",
install_requires=[
# cloud integrations
Expand Down Expand Up @@ -56,5 +56,8 @@
],
"test": ["black", "ipython", "jupyter_console", "pytest", "pytype"],
},
entry_points={"console_scripts": ["skylark=skylark.cli.cli:app"]},
entry_points={"console_scripts": [
"skyplane=skyplane.cli.cli:app",
"skylark=skyplane.cli.cli:app",
]},
)
18 changes: 9 additions & 9 deletions skylark/__init__.py → skyplane/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import os
from pathlib import Path

from skylark.config import SkylarkConfig
from skyplane.config import SkyplaneConfig

# paths
skylark_root = Path(__file__).parent.parent
config_root = Path("~/.skylark").expanduser()
skyplane_root = Path(__file__).parent.parent
config_root = Path("~/.skyplane").expanduser()
config_root.mkdir(exist_ok=True)

if "SKYLARK_CONFIG" in os.environ:
config_path = Path(os.environ["SKYLARK_CONFIG"]).expanduser()
if "SKYPLANE_CONFIG" in os.environ:
config_path = Path(os.environ["SKYPLANE_CONFIG"]).expanduser()
else:
config_path = config_root / "config"

Expand All @@ -19,7 +19,7 @@
gcp_config_path = config_root / "gcp_config"

key_root = config_root / "keys"
tmp_log_dir = Path("/tmp/skylark")
tmp_log_dir = Path("/tmp/skyplane")
tmp_log_dir.mkdir(exist_ok=True)

# header
Expand All @@ -43,7 +43,7 @@ def print_header():
MB = 1024 * 1024
GB = 1024 * 1024 * 1024
if config_path.exists():
cloud_config = SkylarkConfig.load_config(config_path)
cloud_config = SkyplaneConfig.load_config(config_path)
else:
cloud_config = SkylarkConfig(False, False, False)
is_gateway_env = os.environ.get("SKYLARK_IS_GATEWAY", None) == "1"
cloud_config = SkyplaneConfig(False, False, False)
is_gateway_env = os.environ.get("SKYPLANE_IS_GATEWAY", None) == "1"
Loading