Skip to content

🐛 octavia-cli: fix write permissions in ubuntu #11353

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

Merged
merged 2 commits into from
Mar 23, 2022

Conversation

alafanechere
Copy link
Contributor

What

  • The octavia init and octavia generate commands require write permissions to the docker host filesystem.
  • Current aliased docker run command did not provide these permissions explicitly, it makes the octavia init command fails on Ubuntu with a PermissionDeniederror.

How

Map the current host user to the container using the --user option in the docker run command.

@alafanechere alafanechere force-pushed the augustin/octavia-cli/fix-permissions-ubuntu branch from aac5fab to d067299 Compare March 23, 2022 13:22
@@ -104,7 +104,7 @@ This script:
```bash
touch ~/.octavia # Create a file to store env variables that will be mapped the octavia-cli container
mkdir my_octavia_project_directory # Create your octavia project directory where YAML configurations will be stored.
docker run --name octavia-cli -i --rm -v ./my_octavia_project_directory:/home/octavia-project --network host --env-file ~/.octavia airbyte/octavia-cli:latest
docker run --name octavia-cli -i --rm -v ./my_octavia_project_directory:/home/octavia-project --network host --user $(id -u):$(id -g) --env-file ~/.octavia airbyte/octavia-cli:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have two white spaces before --user

@arimbr
Copy link
Contributor

arimbr commented Mar 23, 2022

Nice! I tried curl -s -o- https://raw.githubusercontent.com/airbytehq/airbyte/d0672997104b2179a48a57ddc9bb8aaa748e81bf/octavia-cli/install.sh | bash and octavia init works for me on Ubuntu now.

@alafanechere alafanechere added this to the octavia-cli-alpha milestone Mar 23, 2022
@alafanechere alafanechere merged commit 4bf5c96 into master Mar 23, 2022
@alafanechere alafanechere deleted the augustin/octavia-cli/fix-permissions-ubuntu branch March 23, 2022 13:51
@arimbr
Copy link
Contributor

arimbr commented Mar 23, 2022

@alafanechere is it normal that the directories created by octavia init have user and group root?

🐙 - Octavia is targetting your Airbyte instance running at http://localhost:8000 on workspace 612e4aca-edf3-452b-9e7e-4b847975d3e0.
🐙 - Project is not yet initialized.
🔨 - Initializing the project.
✅ - Created the following directories: sources, connections, destinations.
ari@kraken:~/Projects/octavia-tutorial-2$ tree 
.
├── connections
├── destinations
└── sources

3 directories, 0 files
ari@kraken:~/Projects/octavia-tutorial-2$ ls -l
total 12
drwxr-xr-x 2 root root 4096 mars  23 14:59 connections
drwxr-xr-x 2 root root 4096 mars  23 14:59 destinations
drwxr-xr-x 2 root root 4096 mars  23 14:59 sources
ari@kraken:~/Projects/octavia-tutorial-2$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants