Code Monkey home page Code Monkey logo

cockpit's Introduction

⚡ We are thrilled to announce the release of LocalStack 3.4

LocalStack - A fully functional local cloud stack

CircleCI Coverage Status PyPI Version Docker Pulls PyPi downloads Backers on Open Collective Sponsors on Open Collective PyPI License Code style: black Ruff Twitter

LocalStack is a cloud software development framework to develop and test your AWS applications locally.

OverviewInstallQuickstartRunUsageReleasesContributing
📖 Docs💻 Pro version☑️ LocalStack coverage


Overview

LocalStack is a cloud service emulator that runs in a single container on your laptop or in your CI environment. With LocalStack, you can run your AWS applications or Lambdas entirely on your local machine without connecting to a remote cloud provider! Whether you are testing complex CDK applications or Terraform configurations, or just beginning to learn about AWS services, LocalStack helps speed up and simplify your testing and development workflow.

LocalStack supports a growing number of AWS services, like AWS Lambda, S3, Dynamodb, Kinesis, SQS, SNS, and many more! The Pro version of LocalStack supports additional APIs and advanced features. You can find a comprehensive list of supported APIs on our ☑️ Feature Coverage page.

LocalStack also provides additional features to make your life as a cloud developer easier! Check out LocalStack's User Guides for more information.

Install

The quickest way get started with LocalStack is by using the LocalStack CLI. It enables you to start and manage the LocalStack Docker container directly through your command line. Ensure that your machine has a functional docker environment installed before proceeding.

Brew (macOS or Linux with Homebrew)

Install the LocalStack CLI through our official LocalStack Brew Tap:

brew install localstack/tap/localstack-cli

Binary download (MacOS, Linux, Windows)

If Brew is not installed on your machine, you can download the pre-built LocalStack CLI binary directly:

  • Visit localstack/localstack-cli and download the latest release for your platform.
  • Extract the downloaded archive to a directory included in your PATH variable:
    • For MacOS/Linux, use the command: sudo tar xvzf ~/Downloads/localstack-cli-*-darwin-*-onefile.tar.gz -C /usr/local/bin

PyPI (MacOS, Linux, Windows)

LocalStack is developed using Python. To install the LocalStack CLI using pip, run the following command:

python3 -m pip install localstack

The localstack-cli installation enables you to run the Docker image containing the LocalStack runtime. To interact with the local AWS services, you need to install the awslocal CLI separately. For installation guidelines, refer to the awslocal documentation.

Important: Do not use sudo or run as root user. LocalStack must be installed and started entirely under a local non-root user. If you have problems with permissions in macOS High Sierra, install with pip install --user localstack

Quickstart

Start LocalStack inside a Docker container by running:

 % localstack start -d

     __                     _______ __             __
    / /   ____  _________ _/ / ___// /_____ ______/ /__
   / /   / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
  / /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
 /_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|

 💻 LocalStack CLI 3.4.0
 👤 Profile: default

[12:47:13] starting LocalStack in Docker mode 🐳                       localstack.py:494
           preparing environment                                       bootstrap.py:1240
           configuring container                                       bootstrap.py:1248
           starting container                                          bootstrap.py:1258
[12:47:15] detaching                                                   bootstrap.py:1262

You can query the status of respective services on LocalStack by running:

% localstack status services
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Service                  ┃ Status      ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ acm                      │ ✔ available │
│ apigateway               │ ✔ available │
│ cloudformation           │ ✔ available │
│ cloudwatch               │ ✔ available │
│ config                   │ ✔ available │
│ dynamodb                 │ ✔ available │
...

To use SQS, a fully managed distributed message queuing service, on LocalStack, run:

% awslocal sqs create-queue --queue-name sample-queue
{
    "QueueUrl": "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/sample-queue"
}

Learn more about LocalStack AWS services and using them with LocalStack's awslocal CLI.

Running

You can run LocalStack through the following options:

Usage

To start using LocalStack, check out our documentation.

To use LocalStack with a graphical user interface, you can use the following UI clients:

Releases

Please refer to GitHub releases to see the complete list of changes for each release. For extended release notes, please refer to the LocalStack Discuss.

Contributing

If you are interested in contributing to LocalStack:

We are thankful for all the contributions and feedback we receive.

Get in touch

Get in touch with the LocalStack Team to report 🐞 issues, upvote 👍 feature requests, 🙋🏽 ask support questions, or 🗣️ discuss local cloud development:

Contributors

We are thankful to all the people who have contributed to this project.

Backers

We are also grateful to all our backers who have donated to the project. You can become a backer on Open Collective.

Sponsors

You can also support this project by becoming a sponsor on Open Collective. Your logo will show up here along with a link to your website.

License

Copyright (c) 2017-2024 LocalStack maintainers and contributors.

Copyright (c) 2016 Atlassian and others.

This version of LocalStack is released under the Apache License, Version 2.0 (see LICENSE). By downloading and using this software you agree to the End-User License Agreement (EULA).

cockpit's People

Contributors

pive01 avatar thrau avatar whummer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cockpit's Issues

typo: hostname is used for docker inspect instead of localstack_main

LocalStack Cockpit version: v0.2.1
LocalStack version: 2.1.1.dev
LocalStack Docker container id: 2091a5172071
LocalStack build date: 2023-06-26
LocalStack build git hash: 7e1346e0
Docker Daemon: Docker version 24.0.2, build cb74dfc
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 37 (Thirty Seven)
Release: 37
Codename: ThirtySeven

When running from the console, I see the following error:

10:50:47.128 › stdout: ERROR: '['docker', 'inspect', '--format', '{{json .}}', 'myhostname']': exit code 1; output: b'\nError: No such object: myhostname\n'
{"runtime_version": "2.1.1.dev", "image_tag": "latest", "image_id": 
"a6b86a621a96", "image_created": "2023-06-26T07:01:34", "running": true, 
"container_name": "localstack_main", "container_ip": "172.17.0.2"}

10:50:47.129 › SyntaxError: Unexpected token E in JSON at position 0
    at JSON.parse (<anonymous>)
    at t.parseStatusStdout (/tmp/.mount_LocalSz9URxz/resources/app.asar/dist/main/main.js:14:892681)
    at t.default.getStatus (/tmp/.mount_LocalSz9URxz/resources/app.asar/dist/main/main.js:14:888969)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at t.default.getAndSendStatus (/tmp/.mount_LocalSz9URxz/resources/app.asar/dist/main/main.js:14:896957)
    at i.handle (/tmp/.mount_LocalSz9URxz/resources/app.asar/dist/main/main.js:14:887466)
    at /tmp/.mount_LocalSz9URxz/resources/app.asar/dist/main/main.js:14:896721
10:50:47.587 › stdout: ERROR: '['docker', 'inspect', '--format', '{{json .}}', 'myhostname']': exit code 1; output: b'\nError: No such object: myhostname\n'
{"runtime_version": "2.1.1.dev", "image_tag": "latest", "image_id": 
"a6b86a621a96", "image_created": "2023-06-26T07:01:34", "running": true, 
"container_name": "localstack_main", "container_ip": "172.17.0.2"}

This error reflects what I see if I query docker directly with docker inspect myhostname:

[]
Error: No such object: myhostname

However, if I use docker inspect localstack_main then I see what you're probably looking for.

note: "myhostname" is a substitution for the actual host name

Not working with existing root Docker Daemon

Checking Docker
Docker version 24.0.2, build cb74dfc
Could not detect a running Docker daemon. Please make sure that Docker is running.

[2023-06-12 12:03:43.198] [warn] error: Command failed: docker version
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied

Linux v0.2.1 (beta)

Issue in initializing cockpit on MacOS

Hi Localstack Team -

Mac Os - 12.6 Monterey Intel
Cockpit version - LocalStack Cockpit-0.1.1.dmg
I downloaded and without moving it to applications, have put app in my personal folder.
It can recognize the docker from outside but cannot from inside localstack binary. I do not have docker desktop but using docker with lima and it works perfectly fine for every other application.
Restart doesn't work and if I try to close the application by x, it doesn't close and have to close using activity monitor.
I can run localstack using docker/pip without issues and can play with demo - localstack-demo

It is just not this application :(.

image

Error when attempting to open arm64 app on macOS

After copying the arm64 cockpit app to my Applications folder and attempting to open the app, I get the error:

“LocalStack Cockpit” is damaged and can’t be opened. You should move it to the Trash.

macOS Monterey 12.3.1
MacBook Pro (14-inch, 2021)
Apple M1 Max

app installer: LocalStack Cockpit 0.1.1-arm64.dmg

Use of Docker compose and Cockpit ends in errors

As the title says, I am getting errors if I endeavor to use Cockpit and docker compose.

  1. Using Stop produces this error message in the UI:
spawn C:\Users\marce\AppData\Local\Temp\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\resources\vendor\win32\localstack-packaged-cli\localstack.exe ENOENT
Screenshot of the error

2022_03_16_LocalStack_Cockpit_14_42_13_70

1,5. Furthermore, if I close the Cockpit, it stays open in the background. It needs to be manually stopped from the Task Manager.

Starting the Cockpit again and attempting to Stop the docker gives me this error:

Command failed: C:\Users\marce\AppData\Local\Temp\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\resources\vendor\win32\localstack-packaged-cli\localstack.exe stop
Python path configuration:
  PYTHONHOME = 'C:\Users\marce\AppData\Local\Temp\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\resources\vendor\win32\localstack-packaged-cli'
  PYTHONPATH = (not set)
  program name = 'C:\Users\marce\AppData\Local\Temp\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\resources\vendor\win32\localstack-packaged-cli\localstack.exe'
  isolated = 0
  environment = 0
  user site = 0
  import site = 0
  sys._base_executable = 'C:\\Users\\marce\\AppData\\Local\\Temp\\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\\resources\\vendor\\win32\\localstack-packaged-cli\\localstack.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.platlibdir = 'lib'
  sys.executable = 'C:\\Users\\marce\\AppData\\Local\\Temp\\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\\resources\\vendor\\win32\\localstack-packaged-cli\\localstack.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\marce\\AppData\\Local\\Temp\\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\\resources\\vendor\\win32\\localstack-packaged-cli\\base_library.zip',
    'C:\\Users\\marce\\AppData\\Local\\Temp\\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\\resources\\vendor\\win32\\localstack-packaged-cli\\lib-dynload',
    'C:\\Users\\marce\\AppData\\Local\\Temp\\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\\resources\\vendor\\win32\\localstack-packaged-cli',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00000d88 (most recent call first):
<no Python frame>
Screenshot of the error

2022_03_16_LocalStack_Cockpit_14_51_03_71

  1. In one of the iterrations of the testing, I was able to stop the docker image with Cockpit, but if I set out to start it again I received this error:
Command failed: C:\Users\marce\AppData\Local\Temp\26OcbI6X3kmPRwg2ZrAtdaq6HYJ\resources\vendor\win32\localstack-packaged-cli\localstack.exe start --detached --no-banner
2022-03-16T15:06:30.348:INFO:localstack.utils.threads: Thread run method <function Server.do_start_thread.<locals>._run at 0x0000028F54691700>(None) failed: ('Docker process returned with errorcode 125', None, b'docker: Error response from daemon: Conflict. The container name "/localstack_main" is already in use by container "820d8292bad7854bd8671e3c68b9bdbc0d698b53c17c19edf2cbdd78ed21408b". You have to remove (or rename) that container to be able to reuse that name.\nSee \'docker run --help\'.\n') Traceback (most recent call last):
  File "localstack\utils\container_utils\docker_cmd_client.py", line 512, in _run_async_cmd
subprocess.CalledProcessError: Command '['docker', 'run', '--rm', '--name', 'localstack_main', '-v', 'C:\\Users\\marce\\AppData\\Local\\Temp\\localstack\\var_libs:/var/lib/localstack/var_libs', '-v', 'C:\\Users\\marce\\AppData\\Local\\Temp\\localstack\\cache:/var/lib/localstack/cache', '-v', 'C:\\Users\\marce\\AppData\\Local\\Temp\\localstack:/tmp/localstack', '-v', '/var/run/docker.sock:/var/run/docker.sock', '-p', '127.0.0.1:4566:4566', '-p', '127.0.0.1:4571:4571', '-p', '127.0.0.1:4510-4559:4510-4559', '-e', 'TEST_AWS_ACCOUNT_ID=000000000000', '-e', 'DEFAULT_REGION=us-east-1', '-e', 'DOCKER_HOST=unix:///var/run/docker.sock', '-e', 'HOST_TMP_FOLDER=C:\\Users\\marce\\AppData\\Local\\Temp\\localstack', '-e', 'SET_TERM_HANDLER=1', '--privileged', 'localstack/localstack']' returned non-zero exit status 125.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "localstack\utils\threads.py", line 38, in run
  File "localstack\utils\serving.py", line 168, in _run
  File "localstack\utils\bootstrap.py", line 577, in do_run
  File "localstack\utils\bootstrap.py", line 518, in run
  File "localstack\utils\container_utils\docker_cmd_client.py", line 442, in run_container
  File "localstack\utils\container_utils\docker_cmd_client.py", line 526, in _run_async_cmd
localstack.utils.container_utils.container_client.ContainerException: ('Docker process returned with errorcode 125', None, b'docker: Error response from daemon: Conflict. The container name "/localstack_main" is already in use by container "820d8292bad7854bd8671e3c68b9bdbc0d698b53c17c19edf2cbdd78ed21408b". You have to remove (or rename) that container to be able to reuse that name.\nSee \'docker run --help\'.\n')

[15:06:29] preparing environment                               bootstrap.py:743
           configuring container                               bootstrap.py:751
           starting container                                  bootstrap.py:757
Screenshot of the error

2022_03_16_opera_14_59_22_73

High Contrast / Dark Theme?

I am a vision impaired user and am really strugging with the Cockpit with its current "Light" Theme.
This is making it extremely difficult to navigate the app and find items on the screen or even to work out how to use those items.

Ideally the app should offer a "Dark" theme like many other apps do these days.
This would probably include

  • Dark/Black background
  • Lighter (white not pale blue) coloured text and buttons
  • In MacOs observing the Users choice of theme (Light/dark) and adjusting as required
  • These are just initial thoughts

This would be very helpful for many users who also struggling with this colour scheme

Thanks for your understanding

Can't show anything

Hi,

Cockpit shows that localstack is not running although localstack is running.

os: Ubuntu 22.04
LocalStack Version: 2.0.2
Cockpit: LocalStack Cockpit-0.2.1.AppImage

❯ localstack status
┌─────────────────┬───────────────────────────────────────────────────────┐
│ Runtime version │ 2.0.3.dev │
│ Docker image │ tag: latest, id: 3efd9e874805, 📆 2023-05-04T17:27:52 │
│ Runtime status │ ✔ running (name: "localstack_main", IP: 172.17.0.2) │
└─────────────────┴───────────────────────────────────────────────────────┘

image

Error starting cockpit from Windows Explorer

Repro:

  1. Get Download link from 0.1.1 beta from https://localstack.cloud/products/cockpit/
  2. Go to e-mail, download LocalStack Cockpit 0.1.1.exe.msi
  3. Open windows explorer and double click LocalStack Cockpit 0.1.1.exe

Expected behavior:
Cockpit starts

Actual behavior:
image

Resolution:
Either

  • Change file extension from msi to exe in windows explorer and double-click, or
  • Open git bash and run ./LocalStack\ Cockpit\ 0.1.1.exe.msi

Localstack cockpit not in running status and no logs in UI

After installing cockpit and starting up the services. The health check endpoint returns available but not in running status

localstack-cockpit % curl http://localhost:4566/health
{"services": {"acm": "available", "apigateway": "available", "cloudformation": "available", "cloudwatch": "available", "config": "available", "dynamodb": "available", "dynamodbstreams": "available", "ec2": "available", "es": "available", "events": "available", "firehose": "available", "iam": "available", "kinesis": "available", "kms": "available", "lambda": "available", "logs": "available", "opensearch": "available", "redshift": "available", "resource-groups": "available", "resourcegroupstaggingapi": "available", "route53": "available", "route53resolver": "available", "s3": "available", "s3control": "available", "secretsmanager": "available", "ses": "available", "sns": "available", "sqs": "available", "ssm": "available", "stepfunctions": "available", "sts": "available", "support": "available", "swf": "available", "transcribe": "available"}, "version": "2.1.1.dev"}%   bviswanathan@MAC-FVFH266MQ6LR localstack-cockpit % 

No logs are shown in the UI.

win executable triggers security warnings

this isn't critical (more like a friendly suggestion): On my Windows machine LocalStack Cockpit 0.1.1.exe triggered mutliple security popups and asked for excemptions (Browser after download, Windows SmartShield/Defender, Anti Malware). I don't mind, but in managed environments this can be a hassle.

I believe this would much improve if the installer and the binaries that it exctracts were codesigned with a cert from a trusted CA.

I don't really see the point

Hi, thanks for making localstack. Quite cool project!

The Cockpit, which I had to give out my email for... It doesn't really do anything. It looks like an ElectronJS app, but for how low-level it is. I might as well use a docker-compose.yml file.

On first start it complained a ~/.localstack folder was not available.

So I did mkdir -p ~/.localstack, and asked it to restart... The app did not restart.

Then once it did start it pulled localstack ignoring the localstack-full I had pulled.

Once it had pulled an image, it did not start it, or create a default profile.

Once the container was running, services was a reporting view, that gave no clear indication that I could change anything from that view. This was probably the most surprising thing.

So I created a profile (as it still had not)

Looks like environment var config. No autocompletes, no predetermined options. No blank UI states. No UI at all really.

I was just exploring. but I feel like maybe just focus on the docker side if this is working as intended.

From a business standpoint I was surprised there was no upselling of pro.

Starting with Pro API key is not working

Hi,

I'm trying to start LocalStack Cockpit version 0.1.1 with a Pro trail, but it's not starting.

I'm using Ubuntu 21.10

When I try to start a configuration without the key the services start properly.
This is the configuration
LOCALSTACK_API_KEY={key} DEBUG=1

This is the error log could not connect to LocalStack health endpoint at http://localhost:4566

Checking LocalStack CLI Fails

With message: Couldn't detect the LocalStack CLI. Make sure it is installed and on your path. See [documentation](https://docs.localstack.cloud/get-started/#localstack-cli) for more information.

However, the localstack-cli is findable/usable within the terminal

➜ which localstack
/home/XXXXX/.local/bin/localstack

Sorry for the brevity of this report, but I did not see any means of gathering verbose logging from the app. Below are my system details.

Arch Linux
Kernel: Linux 5.16.14-arch1-1 x86_64
Shell: zsh 5.8.1
Memory: 62.4 GiB
CPU: Intel® Core™ i9-10885H CPU @ 5.300GHz × 16
GPU: Intel CometLake-H GT2 [UHD Graphics]
GPU: NVIDIA GeForce GTX 1650 Ti Mobile
Disk Capacity: 2.0 TB
Desktop Environment: GNOME 41.3
Windowing System: Wayland

File > Restart is not working as expected

Hi,

Option under File > Restart does not work. It just kills the LocalStack-Cockpit and does not start it again.
I am expecting that it should restart the program (stop the service and start anew).

2022_03_16_opera_14_25_22_69

Documentation: Windows users can't run from Downloads directory

I had used the emailed link to download cockpit as $env:USERPROFILE\Downloads\LocalStack Cockpit 0.1.1.exe. Initially I went to the properties and checked the "Unblock" checkbox, clicked "OK" and then double-clicked the file to run it. The app would start but did not show LocalStack as running (I had previously started it from the CLI) and if I tried to "START" from the UI I would immediately get an error message about "spawn C:... ENOENT". I ended up creating a directory at $env:LOCALAPPDATA\Programs\LocalStack and moved the file there as Cockpit.exe and then it worked just fine. I recommend adding some documentation for "installing" on Windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.