Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

8

There really is no way to take on your problem with git, which is to deny a developer with access to the code (required to work with it) the possibility to steal the code. This is because as soon as your developer has the code in a readable format (to program on it), he can do with it whatever he wants, anyways. git-crypt has a totally different use, and is ...


7

You could look at tools such as Postman which focuses on testing REST APIs with JavaScript - it has some nice features but you lose the use of Python. Instead, I'd suggest looking at REST-related plugins for pytest, a Python test framework that simplifies your test code, while still running tests written using unittest. For example, writing parameterised ...


7

Trying to connect from outside fails Are you actually connecting from outside? Flask is binding to localhost (127.0.0.1) and that will only be reachable from within the container. If you're on your local machine, you'll need flask to bind to all IP's: from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return "Hello World!" if ...


5

I am not familiar with Python development nor DigitalOcean, so I'll just offer a few pointers: The goal is to automate. Everything. How you achieve that is really up to you, and creating your own tooling is not far-fetched, many do it that way. One concrete and pretty low(ish) hanging fruit is to get a git post-receive hook running which deploys and ...


5

Your python problem is the \n after the commands, write already append a newline, so your script does the following: $cred = Get-Credential # Start the command # This line is ignored as extraneous after Get-Credential, but you can see it in your output. Administrator # Send proprely to the User: prompt # Sent to the Password: prompt Password # Send to the ...


4

What are the general ways to tackle this problem? The ideal way to resolve your problem would be to dockerise your application, as it would remove any worries you have about compatibility between your build and running servers. Installing dependencies using pip in a Dockerfile is trivial, and as long as you're deploying the same container image you never ...


4

One could consider to package the scripts. Depending on the distribution, e.g. ubuntu, windows, centos one could create a ppa, nuget or rpm respectively. Once a newer version is installed, the package manager will remove the previous version automatically. As yum or zypper could be used to install packages on OpenSuse one could consider to create an rpm by ...


4

Boto3 is a client for AWS API, so by definition it doesn't handle the synchronous or asynchronous behavior of the API call, that's the API endpoint which define that. You can safely assume that any API endpoint marked as asynchronous will be asynchronous in any API client. Some SDK implement methods to wait for those asynchronous calls, some don't and you ...


3

I am in a similar pair of shoes as you - I am currently, slowly, getting into the DevOps topics after having many, many years of conventional development (and close connections to conventional ops) behind me. You seem to have read a few articles, or heard a few things. That is good. Let me suggest a practical approach how to go on: Take your favourite ...


3

As you are already using Bitbucket, Bitbucket pipelines could be useful. What languages are supported? Node, Ruby, Python, PHP, and more. Anything you can run in a Docker container is supported. why not jenkins? Jenkins could be an option as well. If Bitbucket could trigger Jenkins or Jenkins could check whether there are code changes.


3

It's generally a best practice to make your builds idempotent. Leaving artifacts behind only opens up opportunities for dependency management issues- and resolving those in a resilient way is exactly why you're using a build server. I suggest you take a look at WHY your Python builds are running so slow- if you discover this is because of an overabundance ...


3

I support J.Doe's suggestion for separate Docker files for each of the build and test stage. Such approach also allows you to: re-run the test stage for whatever reason (known intermittent failures, for example) without re-doing the build stage run multiple different test stages in parallel using the same build - for example instead of running a single long ...


3

The error you see in your container is: etcd.EtcdConnectionFailed: Connection to etcd failed due to MaxRetryError(u"HTTPConnectionPool(host=u'localhost', port=2379): Max retries exceeded with url: /v2/keys/my_module/nodes (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',))",) If you take a close look ...


3

Thanks for the great question. Nothing is really trivial the first time you do it and we all were new to something once. My first recommendation is to revisit docker. Try some different guides and tutorials. It's really simple. You have a docker file that gets "built", literally just commands you want ran on the "container" or "image". You push that image ...


3

Specifically for credentials, CloudBees recommends using the Credentials Plugins, which inject the credentials in the environment available to the invoked scripts. From Injecting Secrets into Jenkins Build Jobs: Credentials plugin - provides a centralized way to define credentials that can be used by your Jenkins instance, plugins and build jobs. ...


3

If you are using Pipeline (i.e. Jenkinsfile), use withCredentials. To give a quick and dirty example: withCredentials([[ $class: 'UsernamePasswordMultiBinding', credentialsId: 'my-credentials', usernameVariable: 'user', passwordVariable: 'pw', ]]) { sh("./my-python-script.py --user ${user} --password ${pw}") } Your credentials will be ...


2

I'm going to add more story to the answer @esoterydactyl gave, in case it goes over too many people's heads. Instead of a monolithic build process, maybe you want to build intermediate packages that can be versioned and deployed to your workspace without all the intermediate build steps. Docker is one packaging solution which is super popular in this case. ...


2

If you run everything in the same container... PRO: you have solved the CasC challenge for configuring the testing environment inline as well CON: you miss the blackbox tesing part, imagine your container wouldn't accepts connections from outside. Ouch! Possible solution: I'd go therefore for a multi-stage Docker-based declarative pipeline: one Docker ...


2

It turned out to be an issue with port mapping. After mapping local machine port 8888 to docker's 8888 I could launch the program in browser. sudo docker run -p 8888:8888 jupyter/scipy-notebook


2

You've chosen a fairly difficult stack to support. WAMP is largely used in dev environments, and the windows builds of mysql, php, and apache typically lag their Linux counterparts by a significant amount. You can likely reuse your code, barring any hard coded or absolute paths, on Linux. Once you move to Linux, there are lots of great deployment options, ...


2

We recommend not adding Anaconda to the PATH environment variable, since this can interfere with other software read more ... Anaconda 4.4 added a feature to the Windows installer so that the “verbose” install information is printed out to a special debug streame read more ...


2

@PrestonM indicated that: Whenever I see an "unexpected at this time" error it's in my batch scripts, and it's either because I didn't use the correct escape character, or an absolute path is incorrect. I don't see Anaconda anywhere in your PATH, but I do see Xtralien. Is it possible that you need to add Anaconda? OP feedback was: Not changing ...


2

In my field (science) Anaconda is probably the most common Python distribution in use. conda is the package manager (just to be clear of the distinction). It is difficult to find fault in conda when compared with pip+virtualenv. The one point that I would make is that the Anaconda distribution is meant to be installed per user. If you have a Python ...


2

I use The Foreman for this. It leverages the fog vsphere module to interact with your vSphere server and also works with Google, Microsoft, and Amazon's clouds and other hypervisor systems as well if needed or you need to migrate at some point in the future. This software stack is backed by Red Hat and re-branded as Red Hat Satellite 6 if you wish to use ...


2

Instead of using custom scripts which it seems that you are using, I would consider using open-source tools, similar to what Tensibai has suggested in his comments. I would further split your two Tasks a bit more differently, such that Step 1 would be to just "Set up the VM", and Step 2 would be to "Provision the VM with required programs and configuration"....


1

I found the solution!!! Views Flask-Security is packaged with a default template for each view it presents to a user. Templates are located within a sub-folder named security. The following is a list of view templates: security/forgot_password.html security/login_user.html security/register_user.html security/reset_password.html security/change_password....


1

Your proposed snapshot-id is not syntactically valid. When you tried hard-coding the value, you used a valid identifier. Underscores are not allowed, and the identifier can't begin with a number. Here are the constraints on snapshot identifiers, from the API Reference: DBClusterSnapshotIdentifier The identifier of the DB cluster snapshot. This ...


1

I'm sure it does, otherwise it wouldn't be the module in use in: https://awslimitchecker.readthedocs.io/en/latest/ From their setup.py installation script: requires = [ 'boto3>=1.4.6', 'botocore>=1.6.0', 'termcolor>=1.1.0', 'python-dateutil>=2.4.2', 'versionfinder>=0.1.1', 'pytz' ] Thing is, maybe what you're trying ...


1

A more generic approach would be use a separate virtualized environment for each project, see virtualization. That could be either: a container image - more lightweight, faster and definitely more popular these days, see containers a virtual machine (VM) image, slower and a bit more heavier to maintain than containers You'd have all the project ...


Only top voted, non community-wiki answers of a minimum length are eligible