Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Zazcallabah
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Zazcallabah

    @Zazcallabah

    3
    Reputation
    5
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Zazcallabah Follow

    Best posts made by Zazcallabah

    • RE: How to find out package disk space?

      I managed to get somewhat what I needed from the native api.
      I wrote this script which displays the sum of each image layers, grouped by package

      $key = "<key with native api access>"
      $uribase="http://<proget server>/api/json/"
      $feedid = <feed id>
      $packages = Invoke-webrequest "$($uribase)DockerImages_GetRepositories?key=$($key)&Feed_ID=$feedid" | select -expandproperty Content | convertfrom-json
      
      $size_lookup = @{}
      
      
      $data = @()
      $total = $packages.length
      $count = 0;
      $packages | %{
      	$n = [uri]::EscapeDataString($_.Repository_Name)
      	$progressPreference = 'silentlyContinue'
      	$images = Invoke-webrequest "$($uribase)DockerImages_GetImages?key=$($key)&Feed_ID=$($feedid)&Repository_name=$n" | select -expandproperty Content | convertfrom-json
      	$progressPreference = 'Continue'
      	$images | %{
      
      		$manifest = [System.Text.Encoding]::UTF8.GetString( [Convert]::FromBase64String($_.ManifestJson_Bytes) ) | convertfrom-json
      		$layers = $manifest.layers
      		$sizesum = $layers | ?{$_.size -ne $null } | measure -sum size | select -ExpandProperty sum
      		$obj = @{}
      
      		$obj.Add("Feed",$_.feed_id)
      		$obj.Add("Repository",$_.Repository_name)
      		$obj.Add("Manifest",$manifest )
      		$obj.Add("Layersum", $sizesum )
      		$obj.Add("DownloadCount",$_.Download_Count)
      		$obj.Add("Published",$_.Published_Date)
      		$data += $obj
      
      	}
      
      	$count++
      	write-progress -PercentComplete ($count*100/$total) -Activity "Working..."
      }
      
      $data | convertto-json -depth 99 | set-content -encoding utf8 out.json
      
      $data | group-object Repository | %{
      	$s=$_.group | measure -sum layersum | select -ExpandProperty sum;
      	$n = $_.name;
      	new-object psobject -Property @{"name"=$n;"size"=$s}
      } | sort-object size
      
      
      
      
      
      posted in Support
      Zazcallabah
      Zazcallabah
    • How to find out package disk space?

      Dealing with a low disk space situation, I'm having trouble locating which docker packages are taking up space. I know from the "manage registry" page that the whole feed is taking up some 99% of the disk, which isn't really helping me.

      I need to know how much disk space is claimed by each package - each of which can have hundreds of tagged versions. Is this information available anywhere?

      posted in Support
      Zazcallabah
      Zazcallabah

    Latest posts made by Zazcallabah

    • RE: Retention rule quota is backwards. "Run only when a size is exceeded" deletes the specified amount of packages, instead of until feed is specified size.

      The behavior Im seeing is that, with a disk full of alpha and beta images (300 GB), when I limit to 20GB, it deletes 20GB of images. leaving 280 GB of images on disk. When I limit to 10 GB it deletes 10 GB of images, leaving 290 GB of images on disk.

      I would expect the rule to delete 280 GB of images instead, leaving 20GB of images on disk.

      The code you linked is what tells the rule to run or not run, no? Is it the same code that runs while the rule is actively deleteing as well?

      posted in Support
      Zazcallabah
      Zazcallabah
    • Retention rule quota is backwards. "Run only when a size is exceeded" deletes the specified amount of packages, instead of until feed is specified size.

      When I set a retention rule on our docker feed,
      20gb.png

      It deletes 20GB of packages. There are many more packages available to delete. (Using dry-run here, so unless there is a bug in dry-run?)
      When I set it to 10000mb it instead deletes 10GB of packages.

      Since the documentation on https://docs.inedo.com/docs/proget/administration/retention-rules says

      "The user-specified size applies to the total size of all packages that match the rule's filters. The rule will only delete packages until the remaining matches consume disk space less than or equal to the specified size."
      

      I interpret this to be a bug. I would assume that the retention rule would delete until there are 20GB packages left on disk, not delete 20GB of packages.

      posted in Support
      Zazcallabah
      Zazcallabah
    • RE: How to find out package disk space?

      I managed to get somewhat what I needed from the native api.
      I wrote this script which displays the sum of each image layers, grouped by package

      $key = "<key with native api access>"
      $uribase="http://<proget server>/api/json/"
      $feedid = <feed id>
      $packages = Invoke-webrequest "$($uribase)DockerImages_GetRepositories?key=$($key)&Feed_ID=$feedid" | select -expandproperty Content | convertfrom-json
      
      $size_lookup = @{}
      
      
      $data = @()
      $total = $packages.length
      $count = 0;
      $packages | %{
      	$n = [uri]::EscapeDataString($_.Repository_Name)
      	$progressPreference = 'silentlyContinue'
      	$images = Invoke-webrequest "$($uribase)DockerImages_GetImages?key=$($key)&Feed_ID=$($feedid)&Repository_name=$n" | select -expandproperty Content | convertfrom-json
      	$progressPreference = 'Continue'
      	$images | %{
      
      		$manifest = [System.Text.Encoding]::UTF8.GetString( [Convert]::FromBase64String($_.ManifestJson_Bytes) ) | convertfrom-json
      		$layers = $manifest.layers
      		$sizesum = $layers | ?{$_.size -ne $null } | measure -sum size | select -ExpandProperty sum
      		$obj = @{}
      
      		$obj.Add("Feed",$_.feed_id)
      		$obj.Add("Repository",$_.Repository_name)
      		$obj.Add("Manifest",$manifest )
      		$obj.Add("Layersum", $sizesum )
      		$obj.Add("DownloadCount",$_.Download_Count)
      		$obj.Add("Published",$_.Published_Date)
      		$data += $obj
      
      	}
      
      	$count++
      	write-progress -PercentComplete ($count*100/$total) -Activity "Working..."
      }
      
      $data | convertto-json -depth 99 | set-content -encoding utf8 out.json
      
      $data | group-object Repository | %{
      	$s=$_.group | measure -sum layersum | select -ExpandProperty sum;
      	$n = $_.name;
      	new-object psobject -Property @{"name"=$n;"size"=$s}
      } | sort-object size
      
      
      
      
      
      posted in Support
      Zazcallabah
      Zazcallabah
    • How to find out package disk space?

      Dealing with a low disk space situation, I'm having trouble locating which docker packages are taking up space. I know from the "manage registry" page that the whole feed is taking up some 99% of the disk, which isn't really helping me.

      I need to know how much disk space is claimed by each package - each of which can have hundreds of tagged versions. Is this information available anywhere?

      posted in Support
      Zazcallabah
      Zazcallabah
    • Can proget be upgraded using an account that doesnt have db access?

      Our proget installation uses an external sql database, and the connection string specifies integrated security=true, so the user running the proget service has access to the database.

      However, my own user does not, and I run the upgrade program from my user.

      Can I still upgrade? Will proget realize that the database is not upgraded and upgrade it when the service starts, or will I get errors and have a broken service after the attempt?

      posted in Support
      Zazcallabah
      Zazcallabah