Creating and sharing a project
Producing a reliable, customized project is a core function of the ActiveState Platform and the following will show you how to create, share, and use projects that include only the languages and artifacts (packages, bundles, patches, etc.) you need for the specific operating system(s) you are working on.
To create your first project:
- Sign in to your ActiveState Platform account.
- Click the Projects tab to create a personal project, or select an organization from the drop-down to create a project in that organization.
- Click the +New Project button.
- Select a language and version for your project.
- Choose an operating system(s) from the list provided. The option to select more than one operating system may be restricted for certain tiers.
- The project is set to Public by default, paid tiers will be able to select whether your project will be Public or Private.
- Public projects have the details (language & packages used) of this runtime publicly visible, and anyone including anonymous users can install the runtime.
- Private projects have hidden the details (language & packages used) and only members of the organization may install this runtime. In the case of a project in a personal organization, only the creator can see and install this runtime.
- A default project name will be given to your project, you can select a unique name for your project which will act as its default URL.
- To finish your build you can click the Finish Creating Project button to move straight to downloading your project. Or you can add packages to your project by:
- Clicking Search Package Catalog to individually search for and add the packages and versions required for your project. Enter the name of the package or bundle you need and click Add to include them in your project.
- Clicking Add Dependencies from File to import requirements from a file. For more information on specifying your project requirements using a file, see Importing and managing requirements.
- Clicking Close will bring you back to your Project page with a notice to save your changes. Clicking Save will commit your selection(s) to your project and begin the build process.
- Go to the Download Builds tab of your project page and copy the text under the “First time install via command line” window and paste it into your command line. If this is an update to an existing project, you can run the
state pull command to update your local installation.
Importing a project from GitHub
You can import the dependencies needed for your existing GitHub project directly from a requirements file in the root folder of your GitHub repository (at this time we only support Python, Perl, and Ruby).
This feature is only available to users who have already linked a GitHub SSO to their ActiveState account. To find out more, check here
To import an existing GitHub project:
- On your Projects page, click the +New Project button.
- Click the Choose a Repository button.
- Select your repository by using the search bar, clicking the correct repo from the list shown, or entering the repository URL in the field provided.
- Click Scan Repo.
- After receiving an “Import Status Success” message, click Continue to resume building your runtime.
- Select a language version, operating system, and set the visibility of your project to Public or Private.
- Click Create Project to return to your project Configuration page.
In the event that your GitHub integration does not succeed, check that your requirements file name in the root folder of your repo matches the following:
- For Python projects: “requirements.txt”, “Pipfile.lock”, “pyproject.toml”, “poetry.lock”, or any Pipfile
- For Perl projects: “META.json” (or any cpanfile)
- For Ruby Projects: “Gemfile.lock”
Sharing a project
Sharing a project is the simplest way to make sure your development team can get to work and avoid sorting out dependencies or worrying about security or stability issues.
The benefits of sharing a project include:
- Saving fellow developers time and effort setting up a stable development environment.
- Accelerate employee onboarding by having the correct, specific dependencies needed for the project immediately available.
- Educators can standardize student environments and to restrict unneeded artifacts and simplify the learning experience.
- Organizations can better control which tools developers are using and account for what is being used in the event of patches, updates, or security risks.
To share a project click on the Share button and copy the link shown on the project page.
Sending that link to will allow anyone to access the project, provided the project is either public or the recipient is a member of the same organization to which the project belongs. The recipient can then click the Install button on the Download Builds tab of the project page to install the project.
You can also share a project directly by doing the following:
- On the project page, in the Overview tab, click the Install button to generate a “Download and Install” message.
- In the “Install via Command Prompt” section, copy and send the command shown to collaborators (via email, Slack, Microsoft Teams, etc.) to install via their own command line. An example is shown below using a generic “default-activestate” organization and “example_project” project name:
powershell -Command "&$([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/1522266277.9999999999_pdli01/install.ps1'))) -c'state activate --defaultuser-activestate/example_project'"
Using a project created by someone else
After receiving a first time install command to collaborate, or a link to the project page, enter the install command into your local command line to access the project.
For Public projects, the command you received will install the project runtime on your machine whether you have the State Tool installed or not. However, without the State Tool, users of that public project cannot configure the project and will be restricted to using the latest version of the build (i.e. the version received).
Users of public projects with the State Tool installed (and who are signed in to the Platform using the
state auth command) are able to configure the public project, save any changes, and create new versions that can be shared.
For Private projects, the recipient must have the State Tool installed and be signed in to the Platform using the
state auth command. Users of Private projects who are signed in to the Platform are able to configure the project and view the project’s history using the History tab.
While in the History tab, previous versions of the project can be accessed by clicking the View to this Commit link, and can be installed by clicking the Revert to this Commit link.