tarantool / tarantool/tt

Consider extending default ignore list on pack

Open
#810 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

teamE
Dominant language
Go
Stars
113
Forks
18
Avg merge
4d 11h
Merged PRs (30d)
23

Description

Now tt pack ignores some files (for example, .git and .gitignore) on artifact packing by default. There are some popular scenarios that seems to better be covered by default.

Command packs previous artifact

$ tt create vshard_cluster --name myapp290324
   • Creating application in "/home/moiseevgeorgy/Development/sandbox/myapp290324"
   • Using built-in 'vshard_cluster' template.
Bucket count (default: 3000): 
Storage replication sets count (default: 2): 
Storage replicas per replication set count (>=2) (default: 2): 
Routers count (default: 1): 
   • Application 'myapp290324' created successfully
What's next?
Build and start 'myapp290324' application:
    $ tt build myapp290324
    $ tt start myapp290324

Pay attention that default passwords were generated,
you can change it in the config.yaml.
$ cd ./myapp290324/
$ tt init
$ tt pack
$ tt pack tgz
   • Generating new tt.yaml for the new package
   • Apps to pack: myapp290324 
   • Running rocks make       
No existing manifest. Attempting to rebuild...
   • Application was successfully built
   • myapp290324 rocks are built successfully
   • Creating tarball.        
   • Bundle is packed successfully to /home/moiseevgeorgy/Development/sandbox/myapp290324/myapp290324-0.1.0.0.x86_64.tar.gz.
$ tar -ztvf myapp290324-0.1.0.0.x86_64.tar.gz 
drwx------ moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:53 .
drwxr-x--- moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:53 bin
...
drwxr-x--- moiseevgeorgy/moiseevgeorgy        0 2024-03-29 17:53 myapp290324/templates
-rw-r--r-- moiseevgeorgy/moiseevgeorgy     1495 2024-03-29 17:53 myapp290324/tt.yaml
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy      365 2024-03-29 17:53 tt.yaml

Rebuild the artifact after some changes.

$ tt pack tgz
$ tar -ztvf myapp290324-0.1.0.0.x86_64.tar.gz 
drwx------ moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:55 .
drwxr-x--- moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:55 bin
...
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy 25630806 2024-03-29 17:55 myapp290324/myapp290324-0.1.0.0.x86_64.tar.gz
...
drwxr-x--- moiseevgeorgy/moiseevgeorgy        0 2024-03-29 17:55 myapp290324/templates
-rw-r--r-- moiseevgeorgy/moiseevgeorgy     1495 2024-03-29 17:55 myapp290324/tt.yaml
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy      365 2024-03-29 17:55 tt.yaml

Rebuild the artifact after more changes.

$ tt pack tgz
$ tar -ztvf myapp290324-0.1.0.0.x86_64.tar.gz 
drwx------ moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:56 .
drwxr-x--- moiseevgeorgy/moiseevgeorgy 0 2024-03-29 17:56 bin
...
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy 51182800 2024-03-29 17:56 myapp290324/myapp290324-0.1.0.0.x86_64.tar.gz
...
-rw-r--r-- moiseevgeorgy/moiseevgeorgy     1495 2024-03-29 17:56 myapp290324/tt.yaml
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy      365 2024-03-29 17:56 tt.yaml

And so on.

Command packs credentials file

$ cat tt.yaml
ee:
  credential_path: ./credentials.txt
$ cat credentials.txt
mylogin
mypassword
$ tt pack tgz
$ tar -ztvf myapp290324-0.1.0.0.x86_64.tar.gz
drwx------ moiseevgeorgy/moiseevgeorgy 0 2024-03-29 18:03 .
drwxr-x--- moiseevgeorgy/moiseevgeorgy 0 2024-03-29 18:03 bin
...
-rw------- moiseevgeorgy/moiseevgeorgy       20 2024-03-29 18:03 myapp290324/credentials.txt
...
-rw-r--r-- moiseevgeorgy/moiseevgeorgy      1495 2024-03-29 18:03 myapp290324/tt.yaml
-rw-rw-r-- moiseevgeorgy/moiseevgeorgy       365 2024-03-29 18:03 tt.yaml

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the default ignore handling used by the tt pack command and reproduce both examples from the issue. The change is complete when rebuilding an artifact does not include the previous archive and packing does not include the referenced credentials file, while the documented package contents remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.