Package: inletscolab
Inlets ColabRunCodeServeronColabusingInletsin less than 60 secs using your own domain.FeaturesOptimized for Inlets/InletsProUse your own Custom Domaini.e. https://colab.yourdomain.comQuick DeploymentPassword Protection (Optional)Notebook/CLI SupportGDrive IntegrationCloud Storage Integration (gcs, s3, minio, etc.)Currently Tested Storage BackendsGCP Cloud StorageAWS S3MinioInstallation# From pypipipinstall--upgradeinlets-colab# From sourcepipinstall--upgradegit+https://github.com/trisongz/inlets-colabRequirementsInlets ServerUsage in Colab Notebookimportosos.environ['INLETS_LICENSE']=...# Inlets Pro Licenseos.environ['INLETS_TOKEN']=...# Inlets Tokenos.environ['INLETS_TUNNEL_HOST']="inlets.domain.com"# Inlets Tunnel Host (ControlPlane)os.environ['INLETS_SERVER_HOST']="colab.domain.com"# Inlets Tunnel Host (DataPlane)os.environ['INLETS_CLIENT_HOST']="127.0.0.1"# The Local Server IPos.environ['INLETS_CLIENT_PORT']="7070"# The Local Server IPos.environ['GENERATE_AUTH']="true"# Will generate password if not providedos.environ['MOUNT_GS']="true"# Bool to mount GCS Bucketos.environ['GS_BUCKET']="gs_bucket"# Name of GCS Bucket to Mountos.environ['GS_PROJECT']="gcs_project"# Project Name within GCPos.environ['GS_AUTH']=...# Base64 Encoded String of your ServiceAccount.jsonfrominletscolab.clientimportInletsColabInletsColab.start()Usage in Colab Notebook + Terminal## Write your env config to envfile.yaml%%writefile/content/envfile.yamlINLETS_LICENSE:...INLETS_TOKEN:...INLETS_TUNNEL_HOST:inlets.domain.comINLETS_SERVER_HOST:colab.domain.comINLETS_CLIENT_HOST:127.0.0.1INLETS_CLIENT_PORT:'7070'GENERATE_AUTH:'true'MOUNT_GS:'true'GS_BUCKET:gs_bucketGS_PROJECT:gcs_projectGS_AUTH:...## Now use the CLI to launch targeting the envfile.yamlinletscolabstart--envfile/content/envfile.yamlCurrently Tested Inlets ServerInlets in VMInlets in Kubernetes ClusterExternal:ExternalDNSCertManagerRepo:https://inlets.github.io/inlets-pro/charts/Chart:inlets-pro/inlets-proHelm Values:ingress.domain:$INLETS_TUNNEL_HOSTdataPlane.ports[0].port:$INLETS_CLIENT_PORTdataPlane.ports[0].targetPort:$INLETS_CLIENT_PORTProvider:aws-eksIngress:Type:loadbalancer from nginx-controllerClass:nginxService:...-inlets-pro-data-planePort:$INLETS_CLIENT_PORTPath:/PathType:PrefixHost:$INLETS_SERVER_HOSTCurrently Tested Inlets Cloud ProvidersGCP ComputeEngineGCP GKEAWS EC2AWS EKSDigitalOcean DropletDigitalOcean KubernetesLinodeAzureOracleCode ServerDefault Version:3.12.0Default Plugins:PythonPylanceJupyterRainbowCSVVSCode IconsAREPL for PythonPython IndentRemote SSHTabnineResourceMonitorEnvironment VariablesBelow are the Environment Variables that are used to build the ConfigclassInletsConfig:license:str=Env.to_str('INLETS_LICENSE','')token:str=Env.to_str('INLETS_TOKEN','')tunnel_host:str=Env.to_str('INLETS_TUNNEL_HOST','')server_host:str=Env.to_str('INLETS_SERVER_HOST','')server_port:int=Env.to_int('INLETS_SERVER_PORT',8123)client_host:str=Env.to_str('INLETS_CLIENT_HOST','127.0.0.1')client_port:int=Env.to_int('INLETS_CLIENT_PORT',7070)domain_name:str=Env.to_str('INLETS_DOMAIN','localhost')is_cluster:bool=Env.to_bool('INLETS_CLUSTER','true')client_type:str=Env.to_str('INLETS_CLIENT_TYPE','tcp')use_sudo:bool=Env.to_bool('INLETS_USE_SUDO','true')classServerConfig:extensions:List[str]=Env.to_list('CODESERVER_EXTENSIONS',DefaultCodeServerExtensions)version:str=Env.to_str('CODESERVER_VERSION',DefaultCodeServerVersion)authtoken:str=Env.to_str('SERVER_AUTHTOKEN','')password:str=Env.to_str('SERVER_PASSWORD','')code:bool=Env.to_bool('RUN_CODE','true')lab:bool=Env.to_bool('RUN_LAB')generate_auth:bool=Env.to_bool('GENERATE_AUTH','true')classStorageConfig:## Bool to mount/not mount## should be 'true'/'false'mount_drive:bool=Env.to_bool('MOUNT_DRIVE')mount_s3:bool=Env.to_bool('MOUNT_S3')mount_gs:bool=Env.to_bool('MOUNT_GS')mount_minio:bool=Env.to_bool('MOUNT_MINIO')## Paths to Bucket(s)## All bucket should exclude their prefixes## i.e. gs://gsbucket -> gsbucket##      s3://s3bucket -> s3buckets3_bucket:str=Env.to_str('S3_BUCKET')gs_bucket:str=Env.to_str('GS_BUCKET')minio_bucket:str=Env.to_str('MINIO_BUCKET')## Paths to Mount Bucket(s)## along with the defaultss3_mount_path:str=Env.to_str('S3_MOUNT_PATH','/content/s3')gs_mount_path:str=Env.to_str('GS_MOUNT_PATH','/content/gs')minio_mount_path:str=Env.to_str('MINIO_MOUNT_PATH','/content/minio')## GCP Cloud Auth## GS_AUTH should be a base64 encoded string of the serviceaccount.json## To create it, run `base64 -i /path/to/serviceaccount.json`## It will likely be _very_ long## If it exists, it will be decoded and saved as proper json to /authz/adc.jsongauth:PathLike=Env.to_json_b64('GS_AUTH','GOOGLE_APPLICATION_CREDENTIALS','/authz/adc.json')gproject:str=Env.to_str('GS_PROJECT')## AWS Cloud Auth## Note: as Colab Locations are Randomly selected globally## you may incur increased ingress/egress charges with large files## in your S3 if regions are far apart. Use with Cautions3_key_id:str=Env.to_str_env('AWS_KEYID','AWS_ACCESS_KEY_ID','')s3_secret:str=Env.to_str_env('AWS_SECRET','AWS_SECRET_ACCESS_KEY','')s3_region:str=Env.to_str('AWS_REGION','us-east-1')## Minio Cloud Auth## Currently Untested## MINIO_ENDPOINT should be the full http/https along with port## i.e. https://minio.yourdomain.com##      http://1.2.3.4:9000minio_endpoint:str=Env.to_str('MINIO_ENDPOINT')minio_key_id:str=Env.to_str('MINIO_KEYID')minio_secret:str=Env.to_str('MINIO_SECRET')Libraries & DependenciesPython DependencieslazyclspylogztyperRuntime Dependenciesinletsctlcodeservergcsfuses3fs-fuseHelpful LinksBelow are some helpful links in setting up Inlets if you do not already have one set up.Setting Up Inlets Server in Kubernetes ClusterSetting up Inlets Server in VM for Multiple Cloud ProvidersLicenseMIT